title: Force Meteor To Refresh / Re-render Templates?
body: <p>*For reference I'm using iron router.</p>
  
  <p>Instead of a sign in page I have this global sign in form embedded in an nav (aka on every page).
  Right now I'm doing a really hacky refresh to reload the page once a user logs in.</p>
  
  <p>I would like to just reload to the template aka not refresh the whole page.
  Basically just want the templates rendered function to rerun on login.</p>
  
  <p>Here's my current login code:</p>
  
  <pre><code>'submit #login': function(event, template){
      event.preventDefault();
      var handle = template.find('#usernameLogin').value;
      var secretKey = template.find('#passwordLogin').value;
      Meteor.loginWithPassword(handle, secretKey, function(err){
          if (err) {
              alert(err);
          }else{
              $('#close').click();
              /* replace this with reactive ajax or whatever when you can! */
              Meteor._reload.reload();
          }
      });
  },
  </code></pre>
  
  <p>My render function which I think may be the real issue now:</p>
  
  <pre><code>Template.tournament.rendered = function () {
      thisCampaign = this.data;
      var self = this;
  
      if (this.data.tournament.live) {
  
          /* if theres a registered user */
          if (Meteor.userId()) {
  
              /* Select a winner box */
              var participants = $('.participant-id');
              var currentParticipant;
              var nextRound;
              var thisMatch;
              var nextMatch;
              var bracket;
              participants.map(function(index, value){
                  if ($(value).text() === Meteor.userId()) {
                      if ($(value).parent().find('.participant-status').text() === 'undetermined') {
                          nextRound = $(value).parent().find('.participant-round').text();
                          thisMatch = $(value).parent().find('.participant-match').text();
                          bracket = $(value).parent().parent().parent().find('.participant');
                      };
                  };
              });
              nextRound = parseInt(nextRound) + 1;
              nextMatch = Math.round(parseInt(thisMatch)/2) - 1;
              if (parseInt(thisMatch) % 2 != 0) {
                  currentParticipant = 0;
              }else{
                  currentParticipant = 1;
              }
              var winnerOptions = '';
              var winnerBox = $('&lt;div class="select-winner"&gt;');
              if (bracket) {
                  bracket.map(function(index, value) {
                      winnerOptions += '&lt;span class="winner-option"&gt; '+$(value).find('.participant-title').text()+' &lt;div class="winner-info"&gt; '+$(value).find('a').html()+' &lt;/div&gt; &lt;/span&gt;'
                  });
                  winnerBox.append(winnerOptions);
                  $($($('.round'+nextRound).find('li')[nextMatch]).find('.participant')[currentParticipant]).removeClass('loser').addClass('undetermined');
                  $($($('.round'+nextRound).find('li')[nextMatch]).find('.participant')[currentParticipant]).find('a').addClass('tooltip').html(winnerBox);
              };
  
          }else{
  
          }
  
      }else{
          /* Tournament Start Time */
  
          var tournamentStartTime = function(){
              var d = new Date();
              var n = d.getTime();
              var currentTime = TimeSync.serverTime(n);
              var startTime = self.data.card.startTime;
              var difference = startTime - currentTime;
              var hoursDifference = Math.floor(difference/1000/60/60);
              difference -= hoursDifference*1000*60*60
              var minutesDifference = Math.floor(difference/1000/60);
              difference -= minutesDifference*1000*60
              var secondsDifference = Math.floor(difference/1000);
              /* if ends (make tournament live server side?) */
              if (hoursDifference &lt; 0 || minutesDifference &lt; 0 || secondsDifference &lt; 0) {
                  Meteor.clearInterval(tStartTime);
                  Session.set("tournamentStartTime", false);
              }else{
                  if (hoursDifference   &lt; 10) {hoursDifference   = "0"+hoursDifference;}
                  if (minutesDifference &lt; 10) {minutesDifference = "0"+minutesDifference;}
                  if (secondsDifference &lt; 10) {secondsDifference = "0"+secondsDifference;}
                  var formattedTime = hoursDifference + ':' + minutesDifference + ':' + secondsDifference;
                  Session.set("tournamentStartTime", formattedTime);
              }
          };
          Session.set("tournamentStartTime", '00:00:00');
          tournamentStartTime();
          var tStartTime = Meteor.setInterval(tournamentStartTime, 1000);
  
          /* Allow new user sign up */
          var alreadySignedUp = false;
          var usersSignedUp = $('.participant-id')
          usersSignedUp.map(function (index, user) {
              if ($(user).text().trim() === Meteor.userId()) {
                  alreadySignedUp = true;
              }
          });
  
          if (this.data.card.host != Meteor.user().username &amp;&amp; !(alreadySignedUp)) {
              var openSlots = [];
              var allSlots = $('.participant');
              allSlots.map(function (index, participant) {
                  if ($(participant).find('.participant-title').text().trim() === '' &amp;&amp; !($(participant).hasClass('loser'))) {
                      openSlots.push(participant);
                  }
              });
              openSlots.map(function (openSlot, index) {
                  $(openSlot).removeClass('winner').addClass('undetermined');
              });
          }
  
          /* if theres a registered user */
          if (Meteor.userId()) {
  
          }else{
  
          }
  
      }
  };
  </code></pre>