implement login/logout process in ui