title: How to override layout.html.twig from FOSUserBundle
body: <p>I know that this question is perfectly answered in FOSUserBundle documentation, but yet I can't solve my problem.</p>
  
  <p>I am trying to make an own login page using FOSUserBundle.</p>
  
  <p>I have a <code>main.html.twig</code> that is EXACTLY the same as the <code>login.html.twig</code> included in the FOSUserBundle source.</p>
  
  <p>The only difference is that main.html.twig is in my own bundle structure and login.html.twig is in FOSUserBundle folder structure.</p>
  
  <p>I reach both <code>/login</code> and <code>/main</code>. I resolve them and the render starts.</p>
  
  <p>But when accessing <code>/main</code>, I get the following error:</p>
  
  <blockquote>
    <p>Twig_Error_Runtime: Variable "csrf_token" does not exist in "AcmeStoreBundle:Main:main.html.twig" at line 5</p>
  </blockquote>
  
  <p>The code is known by the FOSUserBundle users, but anyway I paste it here:</p>
  
  <pre><code>&lt;form action="{{ path("fos_user_security_check") }}" method="post"&gt;
  &lt;input type="hidden" name="_csrf_token" value="{{ csrf_token }}" /&gt;
  
  &lt;label for="username"&gt;{{ 'security.login.username'|trans({}, 'FOSUserBundle') }}&lt;/label&gt;
  &lt;input type="text" id="username" name="_username" value="" /&gt;
  
  &lt;label for="password"&gt;{{ 'security.login.password'|trans({}, 'FOSUserBundle') }}&lt;/label&gt;
  &lt;input type="password" id="password" name="_password" /&gt;
  
  &lt;input type="checkbox" id="remember_me" name="_remember_me" value="on" /&gt;
  &lt;label for="remember_me"&gt;{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }}&lt;/label&gt;
  
  &lt;input type="submit" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>The variable "csrf_token" is somehow not recognized from outside FOSUserBundle. Or something else that I am not getting.</p>
  
  <p>Any clue over there?</p>