Fixed login validation error when USER_ENABLE_EMAIL is False.