template with authentication