Old battery's probably swelled up and that's why it's getting stuck. Don't be shy about removing the entire top cover and front of the frame, if needed.
Even the briefest of power failures can cause your Mac to shut off. At a minimum, this means time wasted while you wait for your Mac to restart. Worse, you lose any unsaved work. Even worse—especially ...