Hooks for service connect and disconnect