An American man who stood in elections for the US Congress has admitted plotting to attack a Muslim community, shooting residents and burning down a mosque.