Harry Kane rifled in a shot into the bottom corner to give Bayern Munich the lead against Heidenheim.