text: import { ref, firebaseAuth } from './firebase.js'
  
  export function auth (email, pw) {
    return firebaseAuth().createUserWithEmailAndPassword(email, pw)
      .then(saveUser)
  }
  
  export function logout () {
    return firebaseAuth().signOut()
  }
  
  export function login (email, pw) {
    return firebaseAuth().signInWithEmailAndPassword(email, pw)
    console.log("THIS IS THE USER" + saveUser);
  }
  
  export function resetPassword (email) {
    return firebaseAuth().sendPasswordResetEmail(email)
  }
  
  
  
  export function saveUser (user) {
    return ref.child(`users/${user.uid}/info`)
      .set({
        email: user.email,
        uid: user.uid
      })
      .then(() => user)
  }
  