I used to bike to school (roughly 9km). It takes a lot less effort to take advantage of someones wake so I did it often myself.
The worst way to handle this that I've experienced was when the guy in front of me just completely slammed his brakes. I was barely able to avoid crashing directly into him which would be rather unpleasant for the both of us. (please don't do this)
The best way from their point of view (not really for me in that situation) was when the guy in front of me just let me ride behind him for roughly half the ride. Then he turned around, made a "pass me" motion with his hand and said with a big smile on his face: "your turn to lead". That way he could use my wake instead so we both had the same benefits. (First time I drove home at 30km/h myself which was pretty heavy XD)
If that's not an option for you then your current solution of gently slowing down till they give up and just pass you isn't really too bad either. They look grumpy 'cause they just lost their easy ride home but that should only last for a short while. It's like saying no to a kid asking you for candy. If you say no they'll be upset but that doesn't mean it's the wrong answer.
I wouldn't really stand up on on my bike in that situation though. Just stop pedaling for a moment and leave room for them to pass you. You can also turn around a bit and wave for them to pass you.
At that point they have 2 options:
- Actually pass you. Let's just hope here that they ride fast enough so you're not stuck behind them afterwards. (not always optimal)
- Ignore your signal and stay behind. Now if you push hard for a moment so you're quickly back up to your normal speed chances are they'll keep their distance more from then on.
If they ignored your signal but still stick with you, you can always slow down a bit and (if possible to do so safely) turn around somewhat to tell them you don't like people follow you so closely so "either pass me or keep your distance please".
At that point you've done your best to stay polite so if they still don't want to listen feel free to become annoying yourself.
Bonus anecdote:
The guy slamming his brakes actually did it twice that ride. I was driving to school for an oral exam and left home a bit late so I had to make up some time. Being able to follow someone driving over my usual average speed would've solved my problem entirely.
So the first time he slammed his brakes I just went past him driving a bit slower than he was doing. Evidently he passed me a bit later at which point I started following him again (I still had to make up time somehow right?).
When he noticed he slammed his brakes right in front of me a second time. This time it wasn't as easy to just fly past him so I had to do the same. In my frustration I called him crazy to which he angrily responded "I don't like people following me".
I'm not saying I handled that too great myself (what can you expect from a 15~17 year old boy?) but had he just asked me not to follow him this entire confrontation could've been easily avoided.