title: Symfony2 custom AuthenticationSuccessHandler and user redirection
body: <p>With <a href="https://stackoverflow.com/questions/11901978/execute-a-code-after-login-check-in-symfony2">this question</a>, it has been clarified how to execute code after the login in a Symfony2 application. In particular, the solution is to write an <code>AuthenticationHandler</code> which implement the interface <code>AuthenticationSuccessHandlerInterface</code>.</p>
  
  <p>Stated that, in the function <code>onAuthenticationSuccess()</code> from interface <code>AuthenticationSuccessHandlerInterface</code>, one has to specify the uri to which the user will be redirected after the login. </p>
  
  <p>By default, when a user try to access a secured area (i.e. <strong>page X</strong>), Symfony2 redirect the user to the login page. When the login success, the user is redirected to the secured <strong>page X</strong>. Hence, there is no a unique page after login (e.g. the home).</p>
  
  <p>How to handle with <code>onAuthenticationSuccess()</code> function to redirect the user to <strong>page X</strong>?</p>