title: fosuserBundle multiple firewalls check path configuration
body: <p>I am using Symfony2 2.3 and FosUserBundle. I am trying to create two firewalls. One for the administration section and the other for frontend. The front end firewall works fine but the admin one doesn't work and it displays this error <code>You must configure the check path to be handled by the firewall using form_login in your security firewall configuration.</code><br>
  Here is my code:<br>
  <strong>security.yml</strong>  </p>
  
  <pre><code># app/config/security.yml
  security:
      encoders:
          FOS\UserBundle\Model\UserInterface: sha512
  
  role_hierarchy:
      ROLE_ADMIN:       ROLE_USER
      ROLE_SUPER_ADMIN: ROLE_ADMIN
  
  providers:
      fos_userbundle:
          id: fos_user.user_provider.username
  
   # Par-feu
  firewalls: 
      # Par-feu du Backoffice
      admin_secured_area:
          pattern: ^/admin/
          form_login:
              provider: fos_userbundle
              csrf_provider: form.csrf_provider
              login_path: fos_admin_user_security_login
              check_path: fos_admin_user_security_check
              default_target_path: biginfo_admin_homepage # A modifier avec le nom de votre route d'accueil pour le Backoffice
          logout:
              path: fos_admin_user_security_logout
              target: fos_admin_user_security_login
          anonymous: true
  
      # Par-feu du FrontOffice
      front_secured_area:
          pattern: ^/
          form_login:
              provider: fos_userbundle
              csrf_provider: form.csrf_provider
              login_path: fos_user_security_login
              check_path: fos_user_security_check
          logout:
              path:        /logout
              target:      /
          anonymous:       true
  
  access_control:
      - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/admin/, role: ROLE_ADMIN }               
  </code></pre>
  
  <p><strong>SecurityController.php</strong>  </p>
  
  <pre><code>    &lt;?php
  
  namespace Biginfo\UserBundle\Controller;
  
  use FOS\UserBundle\Controller\SecurityController as BaseController;
  
  class SecurityController extends BaseController {
  
      /**
       * Renders the login template with the given parameters. Overwrite this function in
       * an extended controller to provide additional data for the login template.
       *
       * @param array $data
       *
       * @return \Symfony\Component\HttpFoundation\Response
       */
      protected function renderLogin(array $data) {
          $requestAttributes = $this-&gt;container-&gt;get('request')-&gt;attributes;
  
          /*
           * Teste de la route de provenance
           * Si route Backoffice login : redirection vers le template de connexion de l'administration
           * Sinon si route FrontOffice login : redirection vers le template de connexion du Frontoffice (l'original de FOSUserBundle)
           */
          if ($requestAttributes-&gt;get('_route') == 'fos_admin_user_security_login') {
              $template = sprintf('BiginfoAdminBundle:Security:login.html.twig');
          } else {
              $template = sprintf('FOSUserBundle:Security:login.html.twig');
          }
  
          return $this-&gt;container-&gt;get('templating')-&gt;renderResponse($template, $data);
      }
  
  }
  </code></pre>
  
  <p>Biginfo\UserBundle\Resources\config\routing.yml  </p>
  
  <pre><code>    biginfo_user_user:
      resource: "@BiginfoUserBundle/Resources/config/routing/user.yml"
      prefix:   admin/user
  
  # Route de connexion au FrontOffice
  fos_user_security_login:
      pattern: /login
      defaults: { _controller: FOSUserBundle:Security:login }
  
  # Route de vérification de connexion au FrontOffice
  fos_user_security_check:
      pattern: /check
      defaults: { _controller: FOSUserBundle:Security:check }
      requirements:
          _method: POST
  
  # Route de déconnexion du FrontOffice
  fos_user_security_logout:
      pattern: /logout
      defaults: { _controller: FOSUserBundle:Security:logout }
  
  # Route de connexion au Backoffice
  fos_admin_user_security_login:
      pattern:  ad/login
      defaults: { _controller: FOSUserBundle:Security:login }
  
  # Route de vérification de connexion au Backoffice
  fos_admin_user_security_check:
      pattern:  ad/check
      defaults: { _controller: FOSUserBundle:Security:check }
      requirements:
          _method: POST
  
  # Route de déconnexion du Backoffice
  fos_admin_user_security_logout:
      pattern:  /logout
      defaults: { _controller: FOSUserBundle:Security:logout }
  </code></pre>
  
  <p>How can I fix it?</p>