Fixing exception on login.