diff --git a/resources/static/pages/browserid.js b/resources/static/pages/browserid.js
index 0e698186572e127be8725629db0067c3c0dcfa1d..f872832b3ffed6d259ea5796f3ad8cada5293e06 100644
--- a/resources/static/pages/browserid.js
+++ b/resources/static/pages/browserid.js
@@ -70,12 +70,13 @@ $(function() {
     $(window).bind('resize', function() { $('#vAlign').css({'height' : $(window).height() }); }).trigger('resize');
   }
 
-  $(".signOut").click(function(event) {
+  $("a.signOut").click(function(event) {
     event.preventDefault();
+    event.stopPropagation();
 
     user.logoutUser(function() {
       document.location = "/";
-    });
+    }, pageHelpers.getFailure(bid.Errors.logout));
   });
 
   $(".display_always,.display_auth,.display_nonauth").hide();