       else
         message = body.message ? body.error ? body
         callback("Requesting packages failed: #{message}")
-
-  getToken: (callback) ->
-    auth.getToken (error, token) ->
-      if error?
-        new Login().run({callback, commandArgs: []})
-      else
-        callback(null, token)
 
   run: (options) ->
     {callback} = options

_ = require 'underscore-plus'
optimist = require 'optimist'

auth = require './auth'
Command = require './command'
config = require './config'
Install = require './install'

      @requestStarredPackages(requestSettings)
    else
      requestSettings.url = "#{config.getAtomApiUrl()}/stars"
      Login.getTokenOrLogin (error, token) =>
        if token?
          requestSettings.headers = authorization: token
          @requestStarredPackages(requestSettings, callback)
