session middleware for socket.io