         confirmOauthToken(token).then (res) ->
           console.log "res: #{res}"
           return unless res
-          atom.config.set('integrated-learn-environment.oauthToken', token)
-          atom.config.set('integrated-learn-environment.vmPort', res.vm_uid)
+          atom.config.set('learn-ide.oauthToken', token)
+          atom.config.set('learn-ide.vmPort', res.vm_uid)
           atom.commands.dispatch(workspaceView, 'learn-ide:toggle-terminal', show: true)
     if newURL.match(/github_sign_in/)
       win.destroy()

  win.loadUrl('https://learn.co/sign_out')

window.logout = ->
  atom.config.unset('integrated-learn-environment.oauthToken')
  atom.config.unset('integrated-learn-environment.vmPort')
  learnLogout()
  githubLogout()

existingToken = atom.config.get('integrated-learn-environment.oauthToken')
vmPort = atom.config.get('integrated-learn-environment.vmPort')

if !existingToken
  learnSignIn()

getVMPort = ->
  confirmOauthToken(existingToken).then (res) ->
    if res
      atom.config.set('learn-ide.vmPort', res.vm_uid)
      atom.commands.dispatch(workspaceView, 'learn-ide:toggle-terminal')
      return true

