edy252-
Could be a couple things.
When you first tried it after replacing the batteries and it worked fine those batteries more than likely had a really full charge on them.
Did you let it sit unplugged for more than a few seconds?
Also what about which outlets did you plug into? Most 500VA UPS's have plugs that are setup for non-critical items like printers.
If you received or have the software and a serial port on the UPS , set it up and do a load & uptime test on it. This will tell you if you have too much load on it( don't think so since it held the first time).
It could have been that the batteries merely did not have enough of a deep current charge on them and lasted the first time but didn't have the strength to hold up to another.
Most replacement batteries come with only a small surface charge and then they could've been sitting on the shelf for awhile too.
I generally don't put a load on a UPS after replacing batteries until it's had them in and it turned on for 24hrs. This gives the system a chance to equalize and deep charge the battery(ies).
Hope this helps
Bruce S