httpsession: add make_cookie function

and reformat