title: Javascript fail to redirect after firebase authentication
body: <p>I'm authenticating users registered in my firebase database and i want to redirect the user after successful authentication </p>
  
  <pre><code>const txtEmail = document.getElementById('email');
  const txtPass = document.getElementById('password');
  const loginBtn= document.getElementById('reg');
  loginBtn.addEventListener('click', e =&gt; {
    const mail = txtEmail.value;
    const pass = txtPass.value;
    const auth = firebase.auth();
    const promise = auth.signInWithEmailAndPassword(mail, pass);
    if(promise){
      window.location = "{{ route('users') }}";
      console.log("{{ route('users') }}");
    }else{
    }
  });
  </code></pre>
  
  <p>the log is successfully printed but the redirection fails may someone help</p>
  
  <p>this is my form i don't know but maybe there is something wrong in it</p>
  
  <pre><code>&lt;form class="form-horizontal m-t-20" method="post"&gt;
                      {{ csrf_field() }}
                      &lt;div class="form-group "&gt;
                          &lt;div class="col-xs-12"&gt;
                              &lt;input class="form-control" type="text" required="" id="email" placeholder="email"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;div class="col-xs-12"&gt;
                              &lt;input class="form-control" type="password" id="password" required="" name="password" placeholder="Password"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group "&gt;
                          &lt;div class="col-xs-12"&gt;
                              &lt;div class="checkbox checkbox-custom"&gt;
                                  &lt;input id="checkbox-signup" type="checkbox"&gt;
                                  &lt;label for="checkbox-signup"&gt;
                                      Remember me
                                  &lt;/label&gt;
                              &lt;/div&gt;
  
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group text-center m-t-30"&gt;
                          &lt;div class="col-xs-12"&gt;
                              &lt;button class="btn btn-custom btn-bordred btn-block waves-effect waves-light" class="reg" id="reg"&gt;
                                  Login
                              &lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group m-t-30 m-b-0"&gt;
                          &lt;div class="col-sm-12"&gt;
                              &lt;a href="page-recoverpw.html" class="text-muted"&gt;&lt;i class="fa fa-lock m-r-5"&gt;&lt;/i&gt; Forgot your password?&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/form&gt;
  </code></pre>