title: Grails spring security fails to present the login page due to a redirect loop
body: <p>I have upgraded my current spring security plugins to </p>
  
  <ul>
  <li>spring-security-core-2.0-RC2</li>
  <li>spring-security-ui-1.0-RC1</li>
  </ul>
  
  <p><strong>PROBLEM</strong></p>
  
  <p>and I noticed that my login screen no longer shows up. In Chrome it says <strong>This page has a redirect loop</strong></p>
  
  <p><strong>STEPS TO RECREATE THE PROBLEM</strong></p>
  
  <p>So I have tried to create a brand new application called Test to try to isolate the problem.</p>
  
  <p>First, I installed the security and security-ui plugins by adding the following entries in the <strong>BuildConfig.groovy</strong>:</p>
  
  <pre><code>compile ":spring-security-core:2.0-RC2"    
  compile ":spring-security-ui:1.0-RC1"
  </code></pre>
  
  <p>Second I ran the quick start command as follows:</p>
  
  <pre><code>grails s2-quickstart security Person Authority Requestmap
  </code></pre>
  
  <p>and it created 4 domain objects as follows under a package called security: Authority.groovy, Person.groovy, PersonAuthority.groovy and Requestmap.groovy</p>
  
  <p>as well as added the following to my <strong>Config.groovy</strong></p>
  
  <pre><code>// Added by the Spring Security Core plugin:
  grails.plugin.springsecurity.userLookup.userDomainClassName = 'security.Person'
  grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'security.PersonAuthority'
  grails.plugin.springsecurity.authority.className = 'security.Authority'
  grails.plugin.springsecurity.requestMap.className = 'security.Requestmap'
  grails.plugin.springsecurity.securityConfigType = 'Requestmap'
  grails.plugin.springsecurity.controllerAnnotations.staticRules = [
      '/':                              ['permitAll'],
      '/index':                         ['permitAll'],
      '/index.gsp':                     ['permitAll'],
      '/**/js/**':                      ['permitAll'],
      '/**/css/**':                     ['permitAll'],
      '/**/images/**':                  ['permitAll'],
      '/**/favicon.ico':                ['permitAll']
  ]
  </code></pre>
  
  <p>Finally, I have run the app by doing a <strong>grails run-app</strong> command where I would expect the login page (<strong>auth.gsp</strong>) that now is no longer part of your code but of the plugin (by design) to be returned</p>
  
  <pre><code>C\myPathToGrails\.grails\2.2.2\projects\Test\plugins\spring-security-core-2.0-RC2\grails-app\views\login\auth.gsp
  </code></pre>
  
  <p>but instead I get a blank page stating that this page has a redirect loop.</p>
  
  <p>I have also added the following staticRules, cleaning the app, and re-running it again to see if it would fix the problem but the redirect message still ocurred.</p>
  
  <pre><code>'/login/**':                      ['permitAll'],
  '/login/auth/**':                 ['permitAll'],
  '/login.gsp':                     ['permitAll']
  </code></pre>
  
  <p>Anybody has any idea of how to get around this?</p>
  
  <p>Thanks in advance.</p>