implemented login and logout services.