title: Redirect after login in Symfony 2
body: <p>In Symfony 2 you can set up a target for the logout so that after logout you will be redirected to <code>/main</code>. However with the login you will be redirected to <code>/</code>. Is there a manner to setup a target for a (successful) login as well?</p>
  
  <pre><code>firewalls:
      dev:
          pattern:  ^/(_(profiler|wdt)|css|images|js)/
          security: false
  
      login:
          pattern:  ^/m/login$
          security: false
  
      secured_area:
          pattern:    ^/m
          form_login:
              check_path: /m/login_check
              login_path: /m/login
          logout:
              path:   /m/logout
              target: /main
          anonymous: ~
  </code></pre>