flask app for on and off application