Add disconnect on logout

This commit is contained in:
Lance Stout 2013-09-17 11:19:37 -07:00
parent b5b32f3958
commit 4849929f83
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/*global app, me*/
/*global app, me, client*/
"use strict";
var Backbone = require('backbone');
@ -41,6 +41,9 @@ module.exports = Backbone.Router.extend({
}
},
logout: function () {
if (client.sessionStarted) {
client.disconnect();
}
localStorage.clear();
window.location = '/login';
}