add right functions buttons and connect to mysql to log the chat