Possibly extract authentication management into a [React Context](https://reactjs.org/docs/context.html).