Fixed the cookie manager: it ignored session cookie

Closes #216