Added /_whoami and integration test for auth(z|n)

Added new endpoint /_whoami for debugging authentication.
Added integration test which checks that a user is authenticated
using token authentication.
Rearranged initialization of authenticator to support preceeding.
Merge pull request #2016 from erictune/whoami

Added /whoami and integration test for authorization.