code: function checkVersionAndSession(config, setSessionTime, callback) {
  
    var currentTime = (new Date).getTime();
  
    if(!config){
      writeToConfig({
        checkVersion: currentTime,
        checkSession: currentTime
      }, function(err) {
  
        return callback(err);
      });
    }
  
    // console.log(config.checkVersion);
  
    //config file exists
    // config = JSON.parse(config);
    var itIsCheckVersionTime = currentTime - config.checkVersion > 86400000; // check if module is up-to-date every day
    var itIsCheckSessionTime = currentTime - config.checkSession > 604800000; // refresh session every 7 days
  
    // console.log(itIsCheckVersionTime, itIsCheckSessionTime, config.checkVersion, config);
    if (itIsCheckVersionTime || typeof(config.checkVersion) === 'undefined') {
  
      config.checkVersion = currentTime;
      writeToConfig(config, function(err) {
  
  
        checkNPMVersion(function(outOfDate, LatestnpmVersion) {
  
          callback(outOfDate, LatestnpmVersion);
        });
  
      });
  
    } else if (itIsCheckSessionTime || typeof(config.checkSession) === 'undefined') {
      // getNewSessionAuth()
      config.checkSession = currentTime;
      writeToConfig(config, function(err) {
  
        callback();
      });
    }
    callback();
  
  }
docs: function getNewSessionAuth() { } todo: set session time