refactor app and remote
remote example shows client ids for clarity