Updated to add better logging to failures to login