Fixed an occasional bug

When logging out some errors and warnings could get mixed up. Also You have been logged out was not shown.
Merge pull request #31 from Liongold/master

Fixed an occasional bug