title: FOSUserBundle default route to direct to login form
body: <p>Im playing with the FOSUserBundle and am struggling to work out how to setup the security.yml/routing.yml files so that the following rules apply:</p>
  
  <ol>
  <li>www.domain.com/  - if unauthenticated directs to the login page which is using the default <code>www.domain.com/login</code></li>
  <li>www.domain.com/  - if authenticated directs to the /office/home controller.</li>
  </ol>
  
  <p><strong>security.yml</strong></p>
  
  <pre><code>security:
    providers:
        fos_userbundle:
            id: fos_user.user_provider.username
  
    encoders:
        FOS\UserBundle\Model\UserInterface: sha512
  
    firewalls:
        main:
            pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_provider: form.csrf_provider
                always_use_default_target_path: true
                default_target_path: /office/home
            logout:
                path:   fos_user_security_logout
                target: fos_user_security_login
            anonymous:    true
  
    access_control:
        - { path: ^/login, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: ROLE_USER }
        - { path: ^/admin/, role: ROLE_ADMIN }
        - { path: ^/office/, role: ROLE_USER }
        - { path: ^/office$, role: ROLE_USER }
  
  
    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: ROLE_ADMIN
  </code></pre>
  
  <p><strong>routing.yml</strong></p>
  
  <pre><code>home:
      path: /office/home
      defaults:
        _controller: etBundle:Office:home
  </code></pre>
  
  <p>Ive tried making an access control like this: </p>
  
  <pre><code>- { path: ^/, role: ROLE_USER }
  </code></pre>
  
  <p>but I think it creates some kind of loop problem with the other access control lines. and Ive tried a routing reference like this, but all sorts of odd stuff happened!:</p>
  
  <pre><code>default:
      path: /
      defaults:
        _controller: etBundle:Office:home     # &lt;- to try to force it to authenticate
  </code></pre>
  
  <p>Many thanks</p>