device registration is now uses db.