session handling tweaks