modified cookie management and loading strategy