Fixed race condition and combined auth and initialiazation workflow.