added a check for an email option to use in the auth hash