I'd prefer to see the "sessionManager" implemented as a proper, separate component on the server, as well as the session aspect as a separate subcomponent of the request. This may help with the factoring work in getting session-related code out of the socket.io support file.