It is recorded in the Gospel According to Matthew (5:43-48) that Jesus said:
43 “You have heard that it was said, ‘Love your neighbor and hate your enemy.’ 44 But I tell you, love your enemies and pray for those who persecute you, 45 that you may be children of your Father in heaven. He causes his sun to rise on the evil and the good, and sends rain on the righteous and the unrighteous. 46 If you love those who love you, what reward will you get? Are not even the tax collectors doing that? 47 And if you greet only your own people, what are you doing more than others? Do not even pagans do that? 48 Be perfect, therefore, as your heavenly Father is perfect.
Please noticed that Jesus didn’t say that this is because your enemy deserves this love. Instead it is based off of who you say is your Father. For a Christian loving your enemy is based off of a desire to be like our “Father in heaven.” Loving your enemy doesn’t mean that you don’t seek justice, it doesn’t mean that you continue to allow your enemy to hurt you or others, it doesn’t even mean that you don’t use force, if necessary (sorry my pacifist friends I’m not all the way there with you, at least yet), to stop him. It does, however, mean that you treat your enemy as human and thus a bearer of the Imago Dei while you are seeking justice.
Terrorists, such as al-Baghdadi, are not excluded from Jesus’s command to love our enemy. If you proclaim God to be your Father then be like your brother Jesus and love your enemy.