Updated check for error message. Removed model from login.