Fix has_token concern generate_token method