handle errors on login