Chosen Solution

Apple iphone 5 went dead, I replaced battery, it powered up to login screen , the battery charge indicator at 25%, started to enter security code and screen went blank. Plugged the phone in to charge and the apple symbol appears on screen then disappears for a few seconds then reappears in a cycle of 9 seconds appearing and 3 seconds black screen. I am looking for the next diagnosis step. Any help is greatly appreciated.

So it will not boot up anymore? That means you have a boot-loop. Here is a guide that will help you with that: https://discussions.apple.com/thread/732

First of all, keep the iPhone disconnected from power because the more it restarts, the higher the chance of corrupting your firmware and loosing your data (you would need to restore to get back a working phone). Next, try to reseat the battery. May be the connector is loose. Otherwise, next get a new battery from iFixit. I personally use them and they have the lowest return on the market. MOST of the rest are junk. Next, there is a chance you pried a small component next to the battery connector, which is used by the iPhone to transmit info from the battery to the iPhone. This would need micro soldering skills and tools to fix. Use some form of magnification (10x at least) to look between the connector of the battery and the shield next to it. Is there a tiny component missing? Finally, if after everything is done you still get this boot loop (constant restarting), it means your firmware indeed got corrupted and you need to restore your iPhone from DFU.