Saving objects in the local storage