logout bugfixes