fix cookie passing/reading