add findWithCredentials method to User model and update tests