optimize code, update login point