bool LoginScreen(object[] Params)
        {
            UpdateCurrentProfile();
            if (Session.InSpace || Session.InStation || CharSel.AtCharSel)
            {
                return(true);
            }

            if (Login.AtLogin)
            {
                if (Login.Loading)
                {
                    return(false);
                }
                if (Login.ServerStatus != "Status: OK")
                {
                    return(false);
                }
                PopupWindow Message = Window.All.OfType <PopupWindow>().FirstOrDefault(a => a.Message.Contains("A client update is available") ||
                                                                                       a.Message.Contains("The daily downtime will begin in") ||
                                                                                       a.Message.Contains("The connection to the server was closed") ||
                                                                                       a.Message.Contains("Unable to connect to the selected server.") ||
                                                                                       a.Message.Contains("Connection Failed"));
                if (Message != null)
                {
                    EVEFrame.Log("Click");
                    Message.ClickButton(Window.Button.OK);
                    return(false);
                }
                if (Window.All.OfType <PopupWindow>().Any(a => a.Message.Contains("Account subscription expired") ||
                                                          a.Message.Contains("has been disabled")))
                {
                    Log.Log("|rLogin failed, stopping script");
                    Clear();
                    return(true);
                }

                if (Login.Connecting)
                {
                    return(false);
                }

                if (_curProfile != null)
                {
                    if (Config.Mode == "Duration" && DateTime.Now <= Instanced.AddMinutes(LoginDelta))
                    {
                        return(false);
                    }
                    if (Config.Mode == "Period" && DateTime.Now.TimeOfDay < Config.PeriodStart.TimeOfDay)
                    {
                        return(false);
                    }
                    if (Config.Mode == "Period" && DateTime.Now.TimeOfDay > Config.PeriodEnd.TimeOfDay)
                    {
                        Log.Log("|oRun period already complete, closing");
                        Clear();
                        QueueState(Logout);
                    }
                    Log.Log("|oLogging into account");
                    Log.Log(" |g{0}", _curProfile.Username);
                    Login.Connect(_curProfile.Username, _curProfile.Password);
                    InsertState(LoginScreen);
                    WaitFor(5, () => Login.Connecting);
                    return(true);
                }
            }
            return(false);
        }