altered login logic