code for user to log in