Bugfix in logout