I used the basic login form in symfony2 and it works well ( without FOSUSERBUNDLE ).
But how to restrict acces if a user is already authenticated ?

```
if ($this->get('security.context')->isGranted('ROLE_ADMIN')) { }

```

the code above does not work because the login route is not under the firewall... and throw :

> 
> The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL.
> 
> 
> 

How to solve it ?