title: Firebase auth database
body: <pre><code>var firebase = require("firebase");
  
  var config = {
      apiKey: "***",
      authDomain: "***",
      databaseURL: "***",
      projectId: "***",
      storageBucket: "***",
      messagingSenderId: "***"
  };
  
  firebase.initializeApp(config);
  
  firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
      console.log(error.code);
      console.log(error.message);
  });
  
  firebase.database().ref('/Settings').once('value').then(function(snapshot) {
      console.log(snapshot.val().adminID);
  });
  </code></pre>
  
  <p>I wrote this code to read some data from database, but it give me an error. It say that I'm not authenticated, how ca i fix it?</p>