Session.set('currentTopic');
Session.setDefault('topicsLimit', 10);
// Session.setDefault('profileCommentsLimit', 20);
Session.setDefault('currentTab', 'profileComments');
SessionAmplify.set('showingReplies', []);

Accounts.onResetPasswordLink(function (token, done) {
  Session.set('resetPassword', token);
  done();
});

Accounts.onEmailVerificationLink(function (token, done) {
  Accounts.verifyEmail(token, function (error) {
    if (error) 
      alert(formatError(error));
    else
      alert('Success! Your email has been verified.');
  });
});
Session.set('currentTopic');
Session.setDefault('topicsLimit', 10);
// Session.setDefault('profileCommentsLimit', 20);
Session.setDefault('currentTab', 'profileComments');
SessionAmplify.set('showingReplies', []);

Accounts.onResetPasswordLink(function (token, done) {
  Session.set('resetPassword', token);
  done();
});

Accounts.onEmailVerificationLink(function (token, done) {
  Accounts.verifyEmail(token, function (error) {
    if (error) 
      alert(formatError(error));
    else 
      alert('Success! Your email has been verified.');
  });
  done();
});
Call done callback to enable auto logins after clicking on email verification link
Call done callback to enable auto logins after clicking on email verification link
