I have just got my head around the basics of symfony and the fos bundle.

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.

The links on my app to log in / out are (the out of the box defaults:
"/login"
&
"/logout"

However i cannot seem to pass these values to the path function in twig:

```
{% if app.user %}
        <li><a href="{{ path('logout') }}">Log Out</a></li>
{% else %}
        <li><a href="{{ path('login') }}">Log In</a></li> 
{% endif %}

```

I get the error:

```
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. 

```

How can I pass the login and logout to `path` in twig so it works correctly in both dev and prod environment?