Two men have been arrested for their roles in what authorities called “extremist” online communities.