adding a call to freeCookies function to logout function.