added logged out tracking and flushing