Add networking part and upload token function.