Store events in localstorage