Code to log in user is now in proper place