refine auto login on login page