Added cookie support to client

Please review. Thanks!