add login and logout method