Foreign nationals are being wrongly denied entry to the UK after a faltering start to plans to digitise the immigration system. They have struggled to board flights to Britain, despite having legal residence status, as their electronic visas are not working.