add loading dialog to the application