login and logout implemented.