Checks token authentication.
Checks user preauth.
Improve functional test.
Merge pull request #1 from ajgarlag/issue-11158

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