connect/disconnect events of the button