Implemented token validation