Cookies support, fixes #4