Idempotent device registration, improvements to API