modified LTLogIn by huangxiaoxiue