title: symfony AccessDeniedException always redirect to login page
body: <p>I don't understand,</p>
  
  <p><strong>throw new AccessDeniedException('message')</strong> always redirect to the login page. </p>
  
  <p>PS: I use FOSUserBundle and here the security.yml contents:</p>
  
  <pre><code>security:
      encoders:
          ANDRY\UserBundle\Entity\User: sha512
  
      role_hierarchy:
          # Un admin hérite des droits d'auteur et de modérateur
          # ROLE_ADMIN: [ROLE_AUTEUR, ROLE_MODERATEUR]
          # On garde ce rôle superadmin, il nous resservira par la suite
          # ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
          # ROLE_EMPLOYER: ROLE_SEEKER
          ROLE_ADMIN: [ROLE_EMPLOYER, ROLE_SEEKER, ROLE_ALLOWED_TO_SWITCH]
  
      providers:
          main:
              id: fos_user.user_provider.username
  
      firewalls:
          dev:
              pattern: ^/(_(profiler|wdt)|css|images|js)/
              security: false
  
          # main_login:
          #     pattern: ^/%locale%/login$
          #     anonymous: true
  
          main:
              pattern: ^/
              anonymous: true
              provider: main
              form_login:
                  login_path: fos_user_security_login
                  check_path: fos_user_security_check
                  default_target_path: /%locale%
              logout:
                  path: fos_user_security_logout
                  target: /%locale%
              remember_me:
                  secret: %secret%
  
      access_control:
          #     - { path: ^/admin, roles: [ROLE_ADMIN, ROLE_SUPER_ADMIN] }
  </code></pre>