cleanup client logout, misc cleanup