Adds logout functionality