Add session handling flag; Improve server logging