With just a week to go before the election, Safiya Khalid was in tears. She had spent the past six months knocking on hundreds of doors in Lewiston, Maine, the city where she arrived as a refugee more than a decade earlier, and where she hoped to be the first Somali American to win a seat on the city council. Suddenly, online trolls from as far away as Alabama and Mississippi were hurling vile abuse at her, telling her that Muslims had no place in American government and she should go back to where she came from.