fix logout race condition

Signed-off-by: William Rockwood <wrockwood@tadl.org>