Integrated login logic