Add login and logout functionality