title: IndexedDb login function
body: <p>I have been working with indexedDB for a few hours now. I am attempting to create a registration and login system. Registration has worked well but the following code for login doesn't work. The error comes at the first alert after onsuccess. Can anyone help me identify where the error is? Thanks.</p>
  
  <pre><code>function getUser(e) {
  
   var email = document.querySelector("#email").value;
   var password = document.querySelector("#password").value;
  
   console.log("About to login "+email);
  
   var transaction = db.transaction(["users"]); //readonly
   var objectStore = transaction.objectStore("users");
   var request = objectStore.get(email);
  
   request.onerror = function(e) {
    alert("Unable to retrieve data from database!");
    return;
   };
   request.onsuccess = function(e) {
    alert(password " " + request.result.password);
    if(password != request.result.password) {
     alert("Could not log you in");
     return;
    } 
    console.log("You are logged in");
  
   };
  </code></pre>