For those of you who had your phone shut itself down and are having initial problems recharging the battery (battery gets unusually warm (*), charging indicator is blinking or showing errors, can't get it to start up right away, etc), I don't own an S4 but this is pretty typical of any Lithium battery. What you want to do is leave it plugged in and do not attempt to turn the phone on for a while. After 15 minutes, depending on the phone, the error/trouble indicator (or lack of any indication that the phone is charging) should go away and the battery should start charging normally. After a further 10-15 minutes, it's safe to start the phone if you like.
When an Android phone is powered down, a small piece of bootstrap software takes care of the charging. This software is not all that sophisticated, but is very good at "recovering" a battery from extremely low charges, which are very bad in general for Lithium-based batteries. During this recovery process, often an error will show or the phone will look like it's not doing anything. When you try to power it up, that software exits and the bootloader starts. During the boot-up process, charging the battery is not possible, and unless you have a 2A charger hooked up with a proper charging cable, the startup process will be depleting battery. So if you have a very low-power situation in the battery, you can actually ruin the battery by trying to force it to start up prematurely.
Plug it in and resist the temptation to touch it for as long as you can manage.
(*) By "unusually warm", I mean "warmer than you are used to". If the battery becomes actually HOT to the touch as in "ouch, I feel like I might actually get a burn if I hold this or I cannot hold it for more than a half second", unplug it, remove the battery, and get thee to the store from whence it came. You do not want to experience a Lithium battery going into full meltdown. You just.. don't. It's rare, but it does happen.