added support for email auth