Added connect/disconnect commands with respective event handling