Implementing improved token authentication.