Refactoring: checkCredentials now handle checkCredentials and checkCredentialsWithObject