Fix exception logging on failed login