Some publiclogin/logout bugfixes