Why is my wifi resetting every time my phone turns off?

Whenever my phone turns off it forgets all wifi networks i have signed into, meaning that when it switches back on i have to type in passwords again. This has been happening since i upgraded my software to android lollipop 5.0.2