another fix to logout