corrected logout functionality from merge issue