logout button with implemented functionality