Add base login logic