DH and I have two female cats (speyed and microchipped), one of them is very timid as she is a rescue cat, my other one is more confidant.
There's a tom cat in the neighbourhood, no idea who he belongs to. I've asked around but nobody seems to know. He doesn't have a collar but he's fat, well fed looking so not sure if he's a stray or belongs to someone.
For the past 2 months he's been waiting until we go to bed and then coming in through the cat flap, chasing our girls up and down the stairs, spraying all over our lounge, attacking them, obviously wants to have "relations" with them, or maybe just wants to harass them.
We wake up when we hear them fighting, our cats screaming, and DH and I get up and chase him out, but this is a pain in the backside, it's usually about 1am, sometimes later.
Sometimes we sleep through it and come down in the morning to a lounge stinking of cat spray, or his "stuff" or whatever the hell he does.
Last night we had literally switched off the bedroom light at 11.30 and snuggled down when we heard the cat flap go, DH scared him on the stairs and he raced outside, I was waiting at the bedroom window with a bottle of water and tipped it all over him
sorry but it was very satisfying.
Didn't stop him coming back again in the early hours again though.
Magnetic cat flaps aren't really an option, we've had one before (expensive to install) and both cats have lost their special collars in about 20 minutes, leaving them unable to get in the door 
At wits end. Anyone have any ideas?