modified logins controller to handle no email provided