Saving states in DB (and taking into account loggued user, yeah!)