Implement logout and fix test failure.

Forgot a `</script>` tag.