Merge pull request #120 from ahgittin/fix-sessions

tidy logout and other misc minor changes for new server security model