Photon and back-up battery

You might find this thread useful also.
It discusses using a supercap rather than a battery, but the use case is similar to yours.