logindlg.go
func (d *LoginDialog) OnCheck(fn func(string, string) bool) {
	WindowManager().BeginUpdate()
	defer WindowManager().EndUpdate()
	d.onCheck = fn
}
func (d *LoginDialog) OnCheck(fn func(string, string) bool) {
	WindowManager().BeginUpdate()
	defer WindowManager().EndUpdate()
	d.onCheck = fn
}
// OnCheck sets the callback that is called when the
// button "OK" is clicked. The dialog sends to the callback two arguments:
// username and password. The callback validates the arguments and if
// the credentials are valid it returns true. That means the dialog can be
// closed. If the callback returns false then the dialog remains on the screen.