apply login and logout features