Add login logic.