Set m_game_connected to false after emitting Disconnected(). This fixes a bug in a case such that when entering an invalid password, the game would bring you back to the main menu.
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}