Added the logout functionality