private void Window_Closed(object sender, EventArgs e) { f.CloseConnection(); if (!isRoot) //if not logged in as root logout of session { LoginWindow.signedIn = false; } }