Final answer:
The best scope to track users who log in to a website is the User scope for the Custom Dimension, as it collects data across all sessions and hits for each individual user.
Step-by-step explanation:
When setting up a Custom Dimension for users who log in to your website, the most appropriate scope to apply would be the User scope. This scope is used to collect data that is associated with a user for all sessions. Since a login is a user-level action and you would want to recognize users across multiple sessions, the User scope is ideal for tracking behaviors, preferences, or settings that are specific to individuals navigating through your website.
By choosing the User scope, every session from that user as well as every hit within those sessions will be associated with the Custom Dimension. For example, if you want to track whether users are members or non-members, a Custom Dimension with a User scope would allow you to segment your data by user type across all of their interactions with your website.