Improving error messages when some exception occurs on login