added logout feature.
refactored Session functionnality
refactored.