Added rudimentary support for cookies.