fixed missing logout handler invocation bug