improved cookie-related tests