Checks that the created token is authenticated before login the user.

In your current test, you are programatically loging in an user from an unauthenticated token without roles.

This PR fix that error.