adding connect/disconnect to main app