adjusted auto-login to be reliable in the event that a login attempt is canceled