improve main login performance