Added session timer, still not finished.
Timer seems to work correctly.
Need to add sending to server on session end.
Added some helpful cookie functions,
need to refactor the old ones and clean up.