It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

So whenever I go on the defense I obviously have inferior troop numbers, but I was wondering if there was a way to make the army stronger so they didn't die as fast?
There is no troop quality in game, only numbers. Your best bet is either retreat then attack or defend in a castle.
Your best bet is to hope your pixels outnumber their pixels, which is still far more awesome than watching a 3D rendered model perform the same bloody movement a hundred times :)
The attacking force is pretty much guaranteed to win, so if you're being attacked, your best bet is to do as much damage to the enemy as possible and then retreat.

If you do manage to beat the enemy back, you're in a great position to counterattack him; you never lose more than half of your standing forces when you're on the defensive, so you can use the other half of your forces to go on the offensive.