Pass the current replication address through the login activity.
Add a local identity column that is independent of the replication key.
Connect to an emulator host by default, but don't hard-code the back-end connection name.