catching login exceptions