Fixes #6294 : Correct handling of email login