synchronized HtmlPage loginuser()
    {
        HtmlPage hp=null;
        err=0;
        do
        {
            if(enabled)
            {
                hp=login();
                if((hp!=null)&&hp.getTitleText().indexOf("Unknown user or password incorrect")!=-1)
                {
                    st.showMessage("","Got: Unknown user or password incorrect.\nPlease re-enter your username and pass.");
                    try{
                        Thread.sleep(2000);
                    }catch(InterruptedException ex){}
                    ur.userPass();
                    domain=ur.domain;
                    user=ur.mailuser;
                    pass=ur.mailpass;
                    hp=null;
                }
                else if((hp!=null)&&hp.getTitleText().indexOf("you did not provide the correct challenge response")!=-1)
                {
                    st.showMessage("","You entered wrong captcha.\nPlease enter again.");
                    try{
                        Thread.sleep(2000);
                    }catch(InterruptedException ex){}
                    hp=null;
                }
            }
            else
            {
                try{
                    Thread.sleep(5000);
                }catch(InterruptedException ex){}
            }
        }
        while(hp==null);
        //st.displayMessage("","Logged In...");
        st.trayIcon.setToolTip("IITPWebApp");
        return hp;
    }