improve: loggedin, add state to foodrun, use tables