Add login session handling and logout action