get device from cookie