Added connect/disconnect events.