Cover value to boolean use "!!"
authService.isAuthenticated = function () { return !!Session.userId; }; //if Session.userId exist, !Session.userId is "false" //!!Session.userId will be true