issue: https://linear.app/comm/issue/ENG-6001/logout-not-working-and-state-difference-after-invalid-session
There were two problems:
1. Logout doesn't work because logOutLoadingStatusSelector returns 'loading'. This is probably because logout.success is discarded so reduceLoadingStatuses doesn't update the loading status for the logout action. If this is the issue, it was there for a very long time
This we are fixing by removing the loading statuses related to actions that log the user out on actions that log the user in
2. logOutActionTypes.started, setNewSessionActionType and logInActionTypes.success don't clear the redux user store. logOutActionTypes.success does. So if the user logged in before logout succeddeed, they were seeing the same userStore in the state and from the login action, so the ops were being discarded, but the db had been deleted. This resulted in state difference error. For more details see this comment: https://linear.app/comm/issue/ENG-6001/logout-not-working-and-state-difference-after-invalid-session#comment-58f94aae