moved socket logic from app.js to room.js