public static boolean performLogin(String uname, String pword) {
        
        //Set username and password
        if (uname != null) AccountName = uname;
        if (pword != null) Password = pword;
        
        //Initialize request and result objects
        YggdrasilRequest request = new YggdrasilRequest(AccountName, Password);
        YggdrasilResult result = null;
        
        //Submit the login request
        try {
            result = request.send();
        } catch (Exception ex) {
            isLoggedIn = false;
            GlobalDialogs.showNotification("Login failed: (" + ex.getClass().getSimpleName() + ") " + ex.getMessage());
            return false;
        }
        
        if (result.wasSuccessful) {
            isLoggedIn = true;
            Username = result.Username;
            UUID = result.UUID;
            AccessToken = result.AccessToken;
            return true;
        } else {
            isLoggedIn = false;
            Username = null;
            UUID = null;
            AccessToken = null;
            GlobalDialogs.showNotification("Login failed: " + result.ErrorDescription);
            return false;
        }
    }