fixed authenticateByToken