Adds logout functionality.