added basic login logic