finish login and logout. Session function done.