[#976803] Ensure logout event is fired after the logout is finished