You should consider changing your class to "User" instead of "Users". The list_of_users will then be a list of user objects, instead of a list of names. To implement a changeUser function you probably want to create some kind of variable state which indicates whether a user is currently logged in, and which user it is. It is a better design to split the login handling into a separate class, you could for example call it "LoginHandler".