title: Can't get keycloak to redirect to common login page when not authenticated
body: <p>Project is part of a larger site that uses a common login page and keycloak.  The keycloak script is part of a layout that is used by all pages.  When a user that is not authenticated arrives at page it correctly identifies it as 'not authenticated' an gives alert.  But it does not redirect to the page.</p>
  
  <p>This is the script in the base layout used by all pages:</p>
  
  <p>enter code here</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script src="https://someplace.com/auth/js/keycloak.js"&gt;&lt;/script&gt;    
  
  &lt;script&gt;
    var keycloak = Keycloak({
      url: 'https://someplace.com/auth',
      realm: 'myrealm',
      clientId: 'myclientid'
    });
  
    keycloak.init().success(function(authenticated) {
      alert(authenticated ? 'authenticated' : 'not authenticated');
    }).error(function() {
      alert('failed to initialize');
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>It gives the correct alert 'not authenticated' but then does not redirect to the login page '<a href="https://someplace.com/auth" rel="nofollow noreferrer">https://someplace.com/auth</a>'</p>