 
   # check your authentication status
   when 'whoami'
-    login (config) ->
-      exit JSON.stringify user, null, 2 if config.user
+    login ({user}) ->
+      exit JSON.stringify user, null, 2 if user
       exit 'not logged in. try "dobi login"'
 
   # invalid command

      exit "error authenticating" if err
      log 'connected'
      next user, db
 
exit = (msg) ->
  log msg if msg
  process.exit()

          # write to file
          name = "backup-#{slug}-#{Date.now()}.cson"
          fs.writeFileSync path.join(CWD, name), data

          # done
          exit "backup complete: #{name}"

