Ensure cookies are only ever set for admin

fixes #1901

- Adds a trailing slash to the cookie path
- Resolves random log-outs
- Adds a test which proves the case
Merge pull request #1910 from ErisDS/issue-1901

Ensure cookies are only ever set for admin