Turn off device when leave wifi