Logout support

Now supports logging out, by using an extra cookie that can be accessed in js.

In this way, pages can stay cached and know if there is a session or not.