Call Login Error Function Instead of Logout, and check for errors.