update socket functionality related to sessions