authentication in templates