I like to use Splash screens...
I take the time, during a "small" pause between the initial enter anim and the final out anim to load resources, set variables, etc...
So I would check for the connection there, and do the final anim either to close (terminate) or to continue to the main code