Added support for session variables in the template engine.