Add Chat function with socketio support