I\'m working with Firebase in JavaScript.
I use the onAuthStateChanged function to check if the user is logged in, and then redirect to the appropriate html page.