Guys i had the same problem with both the one and the s4. The only solution I got to work was buying a completely new router. For reasons unknown to me, my s4 didn't like the old router. So I bought a new netgear $100 router with both 2.5 ghz band and 5 ghz band . I connect to the router using the 5 g band and have not had any issues at all.
I know this is an expensive solution but it worked for me. Good luck guys.