add LoginUI, LoadingUI and event handler