Fix some bugs in login ui.