added crazy hotfix for errors during login and logout