These changes fix some bugs created by switching how the cookie system works.