Bug: fixed NPE when email was empty for login