using cookies to communicate with mongo