Added disconnect function for UI.