now properly recovers session if client already connected