Use authenticate as the middleware factory