fixed error in denying login if credentials are incorrect