new device registration code. TODO: Test registration device id token synchronization database side.