improve new method for token authentication