implement session manager thread