* Handle the case where a user is surprisingly not in the DB
* Only set referral info on user after creation
* More reliably cache current user info in local storage
* Don't jam username stuff into user listener hook
* Return both user and privateUser from `createuser`
* Make `useStateCheckEquality` more flexible
* Make `AuthContext` track the private user doc
* Change `usePrivateUser` hook to use the auth context data
* Pass both user and private user through SSR to auth context
* Fix bug in create user flow
* Add cloud function to get custom token from API auth
* Use custom token to authenticate Firebase SDK on server
* Make sure getcustomtoken cloud function is fast
* Make server auth code maximally robust
* Refactor cookie code, make set and delete more flexible
* Make a React context to manage the logged in user events
* Remove unnecessary new user creation promise machinery
* Slight refactoring to auth context code
* Improvements in response to James feedback