login and logout implemented