Added support for login either with username or email address