Fellow S4 wifi sufferers - I have done a lot of searching on this and found it is not just a Galaxy or Samsung problem (a lot of angry Droid and HTC users out there with this prob also) It sems to have cropped up when Jellybean was updated (I believe it was 4.1.2? Would have to go read the posts again) and it seems to be related to the AGE of your router. I had a DLink 635 from 2006 - they stopped supporting it in 2010. Everything works BUT my S4 and I work from home, so I need it to work here. After researching it (Google Jellybean wifi issues to see for yourself) I decided to go out an buy a new router - found a list of SUPPORTED ROUTERS (below) and got a NetGear N600 and now have fantastic connection to wifi. Still run into the problem at the occasional restaurant or coffeshop. If your router is more than 5 yrs old, first update the firmware. If that doesn't do it, then look at the list below and start shopping around. Or wait for Google to fix it (I might not live that long) Note on the list - the "unsupported routers" appear to be the tpye that a service provider would install in your home and the "supported" ones are mostly ones you or I would buy.
Hope this helps (Hmmm -now if everyone in public places would just upgrade their routers...)
Here is a list but not limited to the unsupported routers that will not work with the Jelly Bean update
Unsupported
[COLOR=#812528 !important][COLOR=#812528 !important]Routers[/COLOR][/COLOR]
Router Make/Model Technology
Westell VersaLink 327W DSL
Actiontec GT724-WG DSL
[COLOR=#812528 !important][COLOR=#812528 !important]Netgear[/COLOR][/COLOR] DG834GT DSL
Netgear DG934G (Sky Version) DSL
[COLOR=#812528 !important][COLOR=#812528 !important]Linksys[/COLOR][/COLOR] WRPT54G DSL
Motorola Netopia 3347-02 DSL
Siemens gigaset SE567 DSL
Actiontec GT701-WG DSL
Working Models that work with the Jelly Bean Update, for Wi-Fi
Router Brand
[COLOR=#812528 !important][COLOR=#812528 !important]Router [COLOR=#812528 !important]Model[/COLOR][/COLOR][/COLOR] Notes Router Brand Router Model Notes
Actiontec GT704-WR . . Linksys e1500 .
Amped Wireless AP 300 . . Linksys e3000 .
Apple Airport . . Linksys EA2700 N600 Dual-Band
Apple Airport Extreme . . Linksys wrt54g .
Apple Airport Extreme (2.4 GHz) . . Linksys WRT54GL .
Asus rt-n56u . . Linksys WRT54GS .
Belkin F7D22301 . . Linksys WRT54GS .
Belkin F5D7230-4 802.11g 2.4GHz . Linksys WRT54GS v.2 Wireless-G
Belkin F7D22301 . . Linksys WRT600N .
Belkin F7D4302 . . Medialink MWN-WAPR150N .
Belkin N600 . . Netgear WGR614 .
Belkin R5D7230-4 2.4GHz G router . Netgear DG934G .
Belkin Surf f7d2301 v1 . . Netgear JWNR2000 .
Buffalo WHR-HP-G300N . . Netgear N600 .
Cisco WAP4410N . . Netgear N900 (WNDR4500) .
Cisco WAP4410N . . Netgear WGR614 .
Cisco WAP4410N . . Netgear WGR614 .
Cisco WRT160N . . Netgear WGR614 54 MBps G router
Cisco WRT160N . . Netgear Wireless-N 150 .
Cisco WRV210 . . Netgear wnr1000 v3 .
Cisco WRV210 . . Netgear wnr2000 .
Cisco Linksys BEFSR41 . . Netgear WNR2000 .
Cisco Linksys E3000 . . Netgear wnr3500 .
Cisco Linksys WRT120N . . Netgear wpn824 v2 .
DLink di-524 . . Ruckus AP .
DLink dir-605l . . Ruckus VF2825 .
DLink DIR-615 . .
[COLOR=#812528 !important][COLOR=#812528 !important]TRENDnet[/COLOR][/COLOR] TEW-731BR .
DLink dir-615 . . US Robotics 5461 MAXg Router .
DLink DIR-615 . . wireless-n router .
DLink dir-625 . . Zuni Connect .
DLink dir-628 . . . . .
DLink DIR-826L . . . . .
DLink tm-g5240 . . . . .