title: Python Dash: How to update same local storage using two callbacks?
body: <p>Below is my callback for logging into my application when the login button is clicked.</p>
  <pre><code>@app.callback([Output('local', 'data'), Output('redirect-url', 'pathname')],
                [Input('loginButton', 'n_clicks')],
                [State('usernameBox', 'value'),
                 State('passwordBox', 'value'),
                 State('local', 'data'),
                ])
  def login(n_clicks, username, password, local_storage):
      if local_storage is None or not isinstance(local_storage, dict):
          local_storage = {}
  
      if n_clicks:
          try:
              if len(username) &gt; 0 and len(password) &gt; 0:
                  local_storage['user_token'] = 'bearer '+generate_token(username, password)
                  app_layout.update_layout(app)
                  # update the local storage and redirects to home page
                  return local_storage, '' 
          except Exception as e:
              print(traceback.format_exc())
              pass
  
      # refresh the login page
      return local_storage, '/login'
  </code></pre>
  <p>I want to clear my local storage in the similar way when I logout. But I am unable to use Output('local', 'data') as it causes duplication issue. How to clear the local storage without getting into duplication issue?</p>