Update the local storage when the user model changes.