Some people have been having similar problems with older routers.
If the problem persists, go into system settings on your phone and tap on WiFi. Tap on the settings button again and choose "advanced". In the advanced screen uncheck "avoid poor connections".
That should help.