The bugs I fixed with this commit:
- useEffect() being called too many times
- correctly routing/redirecting when the user has logged in
- signing out not working properly (it was trying to sign in as I tried to sign out in onAuthStateChange)
I'm making the confirmation flow clearer by showing an alert indicating that signing up was successful and that a confirmation email will be sent soon.