title: NodeJS and Socket.IO user authentication
body: <p>I was wondering what are the best practices for socket.IO authentication.</p>
  
  <p>Alice emits event 'message' with parameters including Bobs unique identifier etc. Bob receives the message while listening to socket.on('message') event.</p>
  
  <p>How do I prevent unauthenticated users from ever connecting to the server using Socket.IO and how do I emit event to only specific user?</p>
  
  <p>Thank you very much in advance for all suggestions and answers.
  Peter</p>