Added secure cookie for storing random session id.
Will build on this further.
Current work is proof of concept.