void connection_OnLogin(object sender, string username, string ipAddress)
        {
            new Thread(async delegate()
            {
                RegisterNotifications();
                loginPacket = await connection.GetLoginDataPacketForUser();
                //

                /*FileSystemWatcher watcher = new FileSystemWatcher();
                 * watcher.Path = @"..\Common\";
                 * watcher.Filter = "summoner_" + loginPacket.AllSummonerData.Summoner.Name + "_finished.txt";
                 * watcher.NotifyFilter = NotifyFilters.LastAccess |
                 *       NotifyFilters.LastWrite |
                 *       NotifyFilters.FileName |
                 *       NotifyFilters.DirectoryName;
                 * watcher.Created += watcher_Created;
                 * watcher.EnableRaisingEvents = true;*/
                if (loginPacket.AllSummonerData == null)
                {
                    Random rnd          = new Random();
                    String summonerName = username;
                    if (summonerName.Length > 16)
                    {
                        summonerName = summonerName.Substring(0, 12) + new Random().Next(1000, 9999).ToString();
                    }
                    LoLLauncher.RiotObjects.Platform.Summoner.AllSummonerData sumData = await connection.CreateDefaultSummoner(summonerName);
                    loginPacket.AllSummonerData = sumData;
                }
                updateStatus("Logged in on " + loginPacket.AllSummonerData.Summoner.Name);
                updateStatus("Starting at lvl " + loginPacket.AllSummonerData.SummonerLevel.Level);
                if (loginPacket.AllSummonerData.SummonerLevel.Level < 6 && queueType == QueueTypes.ARAM)
                {
                    updateStatus("Need to lvl up before ARAM. Defaulting to intro bots");
                    queueType = QueueTypes.INTRO_BOT;
                }
                updateStatus("Starting with " + loginPacket.IpBalance + "ip");
                LoLLauncher.RiotObjects.Platform.Matchmaking.GameQueueConfig[] availableQueues = await connection.GetAvailableQueues();
                //LoLLauncher.RiotObjects.Platform.Summoner.Boost.SummonerActiveBoostsDTO boosts = await connection.GetSumonerActiveBoosts();
                //LoLLauncher.RiotObjects.Platform.Leagues.Client.Dto.SummonerLeagueItemAndProgresssDTO leaguePosProg = await connection.GetMyLeaguePositionsAndProgress();
                availableChampsArray = await connection.GetAvailableChampions();
                LoLLauncher.RiotObjects.Platform.Summoner.Runes.SummonerRuneInventory sumRuneInven   = await connection.GetSummonerRuneInventory(loginPacket.AllSummonerData.Summoner.SumId);
                LoLLauncher.RiotObjects.Platform.Leagues.Client.Dto.SummonerLeagueItemsDTO leaguePos = await connection.GetMyLeaguePositions();
                object preferences = await connection.LoadPreferencesByKey("KEY BINDINGS", 1, false);
                LoLLauncher.RiotObjects.Platform.Summoner.Masterybook.MasteryBookDTO masteryBook = await connection.GetMasteryBook(loginPacket.AllSummonerData.Summoner.SumId);
                LoLLauncher.RiotObjects.Team.Dto.PlayerDTO player = await connection.CreatePlayer();

                if (loginPacket.ReconnectInfo != null && loginPacket.ReconnectInfo.Game != null)
                {
                    updateStatus("Reconnecting to game");
                    connection_OnMessageReceived(sender, loginPacket.ReconnectInfo.PlayerCredentials);
                }
                else
                {
                    if (queueType == QueueTypes.CUSTOM)
                    {
                        CreatePracticeGame();
                    }
                    else
                    {
                        LoLLauncher.RiotObjects.Platform.Statistics.EndOfGameStats eog = new LoLLauncher.RiotObjects.Platform.Statistics.EndOfGameStats();
                        connection_OnMessageReceived(sender, eog);
                    }
                }
            }).Start();
        }