added login and logout features