Added logging for login errors