Fixed the cookieToJSON creation
Things work pretty well now.