s4 turns off when on battery Hi I have a Samsung s4 I9505 running android 5.0.1 stock

The problem I'm having is that if I try to turn on my s4 while running on battery it never passes the Samsung boot logo, it turns off instantly after the boot process finishes

However with the wall charger plugged in it boots up and works perfectly fine but if I turn the plug off it switches off 40 seconds or so after

Another thing I must add is the power button on the faulty s4 seems abit different to my other working s4, the power button on this one doesn't have to go in that much to turn on or off so little pressure can turn it on. Its a bit more clicky on the other s4. But it still boots up fine with the wall charger so may not be because of this.

Also sometime I can see the s4 at 45% battery and after turning it off and back on after 20 minutes its something like 14%

Funnily though I can boot into recovery with just the battery and leave it there for half an hour and it doesn't turn off

What could be wrong?
First, you might want to see about the battery. See if you can go to your service provider and see if they can swap out your battery for a newer one 
If step #1 doesn't work, you might want to power it on the way you been using it and go to your battery usage and see what's currently using you battery, then stop or force stop those apps. After that, backup all of your things you want and save them to a microSD Card, anything you prefer is just alright. Then do factory reset then set it back up
If steps #1 &amp; #2 didn't work, go to a cell phone shop that you can trust or your cellular provider and see if they can fix it for you. Otherwise, visit amazon.com and look up Galaxy's S4 charger port kits and make sure you pick the right one for your phone and fix it yourself.