Add class method for authentication.