There are things that you should try to check on the phones which is going to help you solve this kind of issues and one of the them is the Ram capacity. You see there is something with making use of a mobile device which that has got low Ram capacity and one of them is that it may start developing faults when you are trying to perform some tasks such as connecting to some Wi-Fi connection and browsing with it.
There was this device that I used to make use of that got 612mb Ram capacity. To be frank with you, it was not a pleasant experience for me as I always have one issue with it or another. So, check the Ram capacity and see if you will have to uninstall some apps and watch the performance of the device when you connect to the Wi-Fi again.