better errors on login and by mail