also take care of cookie method
update cookie method to latest api
Merge pull request #75 from houqp/controller_update

more on controller doc: also take care of cookie method