Restore client ID generation, optionally using id passed to connectClient()