Changes to the user login logic