logout functionality now worksS