There is persistent confusion between the actions of a Religion, and the actions of those who happen to be of that Religion.
The people who beheaded, etc., were obviously very ignorant, with lot of superstitions, and easily misled. They were probably very poor. I believe that it is illogical to demand responsible behavior of a person brought up in such conditions. It is more logical to condemn the Society that forces some members to live in such conditions.
Their actions need not be seen in a Religious light. They are not the organized, educated, well informed representatives of their Religion.
Responsible, logical actions are what Society has a right to expect of those for whom the Society has arranged reasonable protection, well being, etc. If an extremely poor man kills someone, then regardless of motive or circumstance he should be immune from punishment. At the most we should take preventive action against repetition, but should not condemn him or imply that he did wrong. If some "well fed" person sent him to do the murder, it is that second person who should hang and not the one who actually killed.
Right and Wrong begin after the stomach is full, not when it is empty.
Ignorant, deprived, narrow minded people can be of any Religion, and their actions can be very bad, but it has little to do with the Religion.
Rather we should try to identify those behind such things, who try to exploit such people for their own narrow ends.