Add more functions for client to work with cookies. Fixes #155.