add basic cookie support
fixes #2