Server: fix the cookie expiration
Server: make the session cookie transit only over ssl when needed
Merge pull request #286 from tOkeshu/fix-session-duration

Server: fix the cookie expiration