introduced logout functionality