Another fix to logout