"did I not have an updated version of Android?"
No, you installed an unofficial,modified version which comes with risks, as you've discovered.
Try a factory, hard reset:
From a powered off state, press and hold Power, Home and Volume Up buttons to enter fastboot mode.
When you see the Samsung Galaxy S4 screen let go of Power but keep holding the other two.
Once you see your options pop up with the Android on its back you just use the volume buttons to scroll through the options,
select wipe data/factory reset and use the Power button to confirm.
Again, scroll down with the volume buttons to highlight Yes, delete user data (or whatever it says, I forget exactly) hit the Power button to confirm.
Then select Reboot system now and hold your breath.
If it doesn't work, don't blame me. I simply copied that walkthrough word-for-word from another website, and it was definitely for Galaxy S4