As others have said, this is already a feature of N9. You just need to Edit networks and set the WLAN to be automatically connected.