Exception handler implemented on login.