send headers and cookies to the templates too