Update logout function
Merge pull request #170 from BeeR13/patch-2

Update logout function