This examples shows you how to change your wifi credentials, and then immediately disconnect (from the current network) and reconnect (to the new network).