finished the flow for easy headless app authentication.