working on login logic