Adding support for cookie domains.

This fixes #24.