corrected the flow of logout events -- still wrong, but less so now