added login support for email