logout functionality implemented