Improve cookie management.