I\'ve got a wired problem with the symfony 2 security component. Due to the fact that the {{ app.user }} object is only available within the secured area, I set
{{ app.user }}
USe anynymous directive in account_area:
account_area: pattern: ^/ anonymous: ~