Stopping QGC engine

i am trying to make some modifications in QGC Daily builds.

i have added a login page before the main qgc startup page ,but the problem is that before login the application starts running in background and the drone connects to QGC before login. so i want to stop this app from running in background, so that the the vehicles can connect only after login is successfull.

please help,
thanks in advance