exception handling for login, sign in and send email