login logic update