Refine login process 1