Authenticating Users
This is the sample code I used: https://github.com/firebase/quickstart-js/blob/master/auth/email-password.html
The Javascript is obviously more complicated, but not too bad. It has four functions:
toggleSignIn() – handles the Sign In button
handleSignUp() – handles the Sign Up button
sendEmailVerification() – handles the Send Email Verification button
initApp() – updates the UI based on user status