Remove use of session data in templates directly