improve the performance of login significantly