added json support for cookie