<commit_before>
var xhrConfig = function(xhr) {
  xhr.setRequestHeader("Content-Type", "application/json");
  xhr.setRequestHeader("Authorization", "Bearer " + Session.token());
};

m.route.mode = "hash";

m.route(document.body, "/secrets", {
  "/login": Login,
  "/secrets": SecretList,
  "/secrets/:id": SecretEdit,
  "/secrets/new": SecretEdit
});<commit_msg>Logout route<commit_after>var xhrConfig = function(xhr) {
  xhr.setRequestHeader("Content-Type", "application/json");
  xhr.setRequestHeader("Authorization", "Bearer " + Session.token());
};

m.route.mode = "hash";

m.route(document.body, "/secrets", {
  "/login": Login,
  "/secrets": SecretList,
  "/secrets/:id": SecretEdit,
  "/secrets/new": SecretEdit,
  "/logout": {
    controller: function() {
      Session.logout();
      m.route("login");
    }
  }
});
{'fraction_non_alphanumeric': 0.20363636363636364, 'fraction_numerical': 0.0, 'mean_word_length': 4.398692810457517, 'pattern_counts': {'":': 9, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2680223', 'n_tokens_mistral': 298, 'n_tokens_neox': 291, 'n_words': 47}