Fix method for authentication token generation