FINISH LOGIN AND LOGOUT.