Fix review comments

* Extract constants for cookie keys
* Catch NumberFormatException
Merge branch 'refs/heads/feature-multiple-sessions-per-user'