Added UI functionality for chat.