I am in agreement with ptricks. It's fun to think of ways to pull power from the load line, but safety is important with something like this, and this sounds like a good way to go.
If you wanted, you could then add a separate battery charging circuit that just sits in parallel with the load switch, which should be much easier (I'm sure there lots of reference designs for mains-powered battery chargers out there). It may be prohibitively big, though, in which case I'd just recommend traditional batteries.