Base: Move script declaration to <head>

This should block the app from being “loaded” until it is actually
loaded. This is done to fix splash screen from hiding before the app is
truly ready.