Cookies, error handling, and logging