Fix the log-in issue when a registered user tries to register again