I actually meant to remove the entire logic out of the store. The set function would take a callback that is fired with data on success. You would provide the callback function where the set is used, and it would take care of logout/login workflow you have.