Implemented cookie management