def login_url(request, name):
    """ Generate the login URL for a provider."""
    registry = request.registry
    provider = registry.velruse_providers[name]
    return request.route_url(provider.login_route)