Fix logout
Updated testcases
Merge pull request #1 from Xety/fix-logout-event

Fix logout