title: Two different login forms in Symfony 2
body: <h2>Background</h2>
  
  <p>According to the Symfony documentation the login form needs to be specified on the security.yml file, also hes login_check path. Until now my app is working fine, users tries to access a secure page (mysite.com/edit/123) next if they are not logged they will be redirected to /login and after they login they will be redericted again to the original intended path (/edit/123).</p>
  
  <p>Similar question: <a href="https://stackoverflow.com/questions/10166081/two-separate-login-pages-in-symfony-2">Two separate login pages in Symfony 2</a></p>
  
  <h2>Problem</h2>
  
  <p>The problem now is, i need a different login form, lets say /minimal_login, i need to include that on the security.yml but the only way i know is creating a different firewall, and as i saw on the documentation this creates a separate identification scheme, so i suppose users logged by differents firewall can not share the same secured pages, and thats not what i want.</p>
  
  <h2>What is need</h2>
  
  <p>If the user tries to access any secure page but /popup they will be redirected to /login, BUT if they tries to access /popup (and they are not logged) they will be redirected to /minimal_login. And no matter how the user logs into my app, they will always share the same access, i mean, if they log in using /login or /minimal_login they can access the same pages.</p>
  
  <hr>
  
  <h2>My secuity.yml</h2>
  
  <pre><code>jms_security_extra:
      secure_all_services: false
      expressions: true
  
  security:
      role_hierarchy:
          ROLE_ADMIN:       ROLE_USER
          ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
  
      providers:
          main:
              entity: {class: Done\PunctisBundle\Entity\User, property: username}
  
      firewalls:
          dev:
              pattern:  ^/(_(profiler|wdt)|css|images|js)/
              security: false
          main:
              remember_me:
                  key: %secret%
                  lifetime: 3600
                  path: /
                  domain: ~
              pattern: ^/
              anonymous: ~
              form_login:
                  login_path: /login
                  check_path: /login_check
              logout:
                  path:   /logout
                  target: /
  
  
      access_control:
          - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/signup, roles: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/verification, roles: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/popup/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/ajax/track, roles: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/ajax/socialbox, roles: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/, roles: ROLE_USER }
  
      encoders:
          Done\PunctisBundle\Entity\User:
              algorithm:   md5
              iterations: 1
              encode_as_base64: false
  </code></pre>