Check user state

// check if user is authorized
console.log(auth.currentUser)

// check if user logged in or created
const unsubAuth = onAuthStateChanged(auth, user => { // if logged out, user will be null
    console.log('user status changed', user)
})