Write a chat application with private and group chat feature