finished login and logout