Adding byod flag and bug fixes in update token method