You can't compare a 2013 phone (iphone 5S) with a 2014 phone (S5)
Of course the S5 will have overall better performances, but have in mind that it's supposed to face the iPhone 6, and that it's a big ass phone (enormous so there's more space for battery...etc).
I'd go with iPhone 6 (which goes out in less than a month) for the design, the OS (iOS 8 will be excellent, I tried android, windows phone and iOS, and Apple system is the best for me), the build quality, and the resale price,
iPhones can be sold at a really good price when they are used, compared to samsung stuff.
I recently sold an iPhone 4 for 250$, but the Samsung Galaxy S3 for 180$ ... The iPhone 4 is 2010... The S3 is 2012... ?