Fixed an occasional bug

When logging out some errors and warnings could get mixed up. Also You have been logged out was not shown.