Add login logout logic