diff --git a/client/js/shout.js b/client/js/shout.js index 3e79e67..fa906ea 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -87,23 +87,23 @@ $(function() { error.hide(); }); } - body.addClass("signed-out"); + if (!token) { + body.addClass("signed-out"); + } var input = login.find("input[name='user']"); if (input.val() === "") { input.val($.cookie("user") || ""); } - setTimeout(function() { - if (!body.hasClass("signed-out")) { - return; - } - sidebar.find(".sign-in") - .click() - .end() - .find(".networks") - .html("") - .next() - .show(); - }, token ? 200 : 0); + if (token) { + return; + } + sidebar.find(".sign-in") + .click() + .end() + .find(".networks") + .html("") + .next() + .show(); }); socket.on("init", function(data) { diff --git a/src/server.js b/src/server.js index 59780cf..1292a21 100644 --- a/src/server.js +++ b/src/server.js @@ -152,9 +152,7 @@ function auth(data) { } }); if (!success) { - if (!data.token) { - socket.emit("auth"); - } + socket.emit("auth"); } } }