Randomly generating a unique device id