1.remove the onpaint about login dialog, or the messagebox after the login dialog.