small refatoring sockets.js to use socket.get instead of session