title: problem in authenticated rooms in socket.io
body: <p>I want to create rooms for all private chats between two connected users. I'm not getting the point how do users join the room securely.</p>
  
  <pre><code>// client side code
  var socket = io.connect();
  socket
      .emit('Join-Room',"{\"username\": \"myusername\", \"password\" : \"mypassword\"}");
  
  // server side code
  io.sockets.on('connection', function(socket) {
    socket.on('Join-Room', function(userdata) {
     connection.auth(userdata,function(success){
       if(success){
         socket.join(username);
       }
     })
    });
  });
  </code></pre>
  
  <p>The problem is when the client emits a request even to join a room the credential data is received by everyone in the namespace?</p>
  
  <p>What should I change to make this secure?</p>