autoconnect with optional callback