title: Implement private chat using firebase
body: <p>I am trying to implement private chat app (website) using firebase,but i will stuck with the private message logic.
  Here is my code but its only for group chat not private</p>
  
  <pre><code>var messagesRef = new Firebase('https://sample.firebaseio.com/users');
  var message="Hi firebase"
  var userid="1"
  //send message
   messagesRef.push({userid:userid, message:message});
  
  //list the messages
  messagesRef.limitToLast(10).on('child_added', function (snapshot) {
     //get the chat messages
      var data = snapshot.val();
      var username = data.name;
      var message = data.text;
      shomessage.append("from:"+username+"msg:"+message);
  }
  </code></pre>
  
  <p>Suppose i have two users A and B(each user have an unique id) will be in private chat what is the changes in the above code??</p>
  
  <p><strong>Note</strong>:I didn't like to use firechat api</p>