Lollipop 5.1 doesn't automatically connect to wi-fi
I had the same problem with Android 5.1 upgrade on MotoX. 

What worked for me 
- switched off WLAN > restarted the router > switched on WLAN

Hope it helps.