add some default funcs & add session, cookie for template as func