UK Tories lose two seats in by-election