Add login logout mechanism