Updated main app with correct cookie reading.