Hi,
I have been having a similar problem that started occurring in the last week, gradually getting worse and worse with the S4.
I would be using the phone, having quite a lot of battery left, then suddenly the phone shuts down and goes into a boot loop. When I plugin to charge it will come...