It was an interesting one. Here are the offside laws.
http://www.thefa.com/football-rules-...w-11---offside
As I understand it, the three rules affecting this incident are
1) Being in an offside position is not an offence
2) Kane doesn't make 'an obvious attempt to clearly impact on the ability of the opponent to play the ball'
3) Lovren 'deliberately plays the ball'
That's why the decision was correct by the letter of the law, I think, but I still agree with you.
Even though Kane doesn't affect Lovren's ability to play the ball,
the fact that he is standing so close to him means it affects how Lovren can play it. He can't take a touch then clear it in case Kane jumps on the touch, he can't leave it for the keeper because he doesn't know if Kane is offside or not so he's forced to take a swing at it which leads to the penalty.
There was an incident earlier when the linesman didn't put his flag up till the last second which led to a collision between the striker and the keeper. Football's got some odd rules.