direction for further refactoring CookieManager