My S4 says touchwiz and the another system aren't working then reboots and stays at att home screen

A

AC Question

So randomly after picking up my phone it's at the att boot up screen, so i restart it and it goes to my cell home screen then tell's me touchwiz, and another processor isn't working and asks " if i would like to close it, or wait?" I said wait, and after this i can't swipe and just repeats going back to att screen after about 3 to 4 minutes. After i chose to close it same thing happened. I was able to get to factory reset and reset it. But after about 30 min after reseting up the phone it went back to saying touchwiz isn't working and went back to the att screen, now i can't even get back to the settings with out it going to the att screen after 30 sec. Did i get a virus or did the phone just randomly die? Any way i can get past this? and thanks for the help in advance!