Fix issue where unexpected cookies caused 500 errors
Merge branch 'cookie-fix'