add chatroom logic structure and some feature