change CookieManager from config to factory