store unique device_id in database