Finished formular for updating users state.