If you are troubled with workflow of you code, this is exactly the one for you.
things link: A: connect to server B: login C: require player info D: load graphic engine E: enter the first scene and more.
you might have to write quite complicate code, and jump from multiple files, since there could be multiple reliances above those process.
with the help of this project, it can be quite easy for you to figure it out with quite beatiful code.
check the TerminatorDefine.ts to find the best case for you.