fixed bug in email login