Fixed logout function, closes #164
Merge pull request #189 from johann8384/ISSUE164

Fixed logout function, closes #164