title: Unable to generate a URL for the named route "login" as such route does not exist
body: <p>I have just got my head around the basics of symfony and the fos bundle.</p>
  
  <p>I am now trying to create a link in the header of a page that either reads 'log in' or 'log out' based on whether the user is logged in or not.</p>
  
  <p>The links on my app to log in / out are (the out of the box defaults:
  "/login"
  &amp;
  "/logout"</p>
  
  <p>However i cannot seem to pass these values to the path function in twig:</p>
  
  <pre><code>{% if app.user %}
          &lt;li&gt;&lt;a href="{{ path('logout') }}"&gt;Log Out&lt;/a&gt;&lt;/li&gt;
  {% else %}
          &lt;li&gt;&lt;a href="{{ path('login') }}"&gt;Log In&lt;/a&gt;&lt;/li&gt; 
  {% endif %}
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "login" as such route does not exist.") in BloggerBlogBundle:Page:index.html.twig at line 10. 
  </code></pre>
  
  <p>How can I pass the login and logout to <code>path</code> in twig so it works correctly in both dev and prod environment?</p>