title: Symfony 2 : Authentication exception occurred
body: <p>I have a symfony site which works and was developped for version 2.0.9. I tried to upgrade to the latest version (2.4.2) but now each time I try to even access the login page I get a  redirection loop. Here is what the log says:</p>
  
  <pre><code>[2014-03-16 12:39:10] security.INFO: Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.) [] []
  </code></pre>
  
  <p>Here is my security.yml</p>
  
  <pre><code>security:
  encoders:
      Starski\FrontBundle\Entity\User:
          algorithm:                      sha1
          iterations:                     1
          encode-as-base64:               false
  role_hierarchy:
      ROLE_ADMIN:       ROLE_USER
      ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  
  providers:
      main:
           entity:                        { class: Starski\FrontBundle\Entity\User, property: mail }
  firewalls:
      dev:
          pattern:  ^/(_(profiler|wdt)|css|images|js)/
          security: false
  
      login:
          pattern:  ^/demo/secured/login$
          security: false
  
      index:
          pattern:                        ^/
          form_login:
              login_path:                 /login
              check_path:                 /auth
              default_target_path:        /index
              failure_handler:            starski.security.handler
              success_handler:            starski.security.handler
  
  access_control:
      - { path: ^/demo/secured/hello/admin/, roles: ROLE_ADMIN }
  </code></pre>
  
  <p>Anybody know why this could happen ?</p>