You may want to restart your modem/router and then try to connect again. I would suggest restarting the tablet and phone wifi as well. After the modem/router. If they still will not connect, try a different device and see if it will connect, and stay connected. If it does, it is the devices that are the issue.
If a different device also doesn't stay connected, there may be an issue with the modem/router or even with your internet access. If the internet connection isn't good, or it is a high traffic area, you can lose connection often. Which would cause this.
You would need to check with your provider to see if there are any issues in your area.
Another suggestion is to change your password, as to keep anyone else from using your...