     try
       err = JSON.parse(res.text).error_description
       err ?= JSON.parse(res.text).error
-    err ?= "Artsy returned a generic #{res.status}" if res.status > 400
-    err ?= "Artsy returned no access token and no error" unless res.body.access_token?
+    err ?= "Arena returned a generic #{res.status}" if res.status > 400
+    err ?= "Arena returned no access token and no error" unless res.body.access_token?
     err ?= e
 
     # If there are no errors create the user from the access token
     unless err
       return done(null, new opts.CurrentUser(accessToken: res.body.access_token))
-
-    # If there's no user linked to this account, create the user via the POST /user API.
-    # Then pass a custom error so our signup middleware can catch it, login, and move on.
-    if err?.match?('no account linked')
-      params.xapp_token = artsyXappToken
-      request
-        .post(opts.SECURE_ARTSY_URL + '/api/v1/user')
-        .send(params)
-        .end (err, res) ->
-          err = (err or res?.body.error_description or res?.body.error)
-          done err or { message: 'artsy-passport: created user from social', user: res.body }
 
     # Invalid email or password
     else if err.match?('invalid email or password')

initPassport = ->
  passport.serializeUser serializeUser
  passport.deserializeUser deserializeUser
  passport.use new LocalStrategy { usernameField: 'email' }, artsyCallback
  passport.use new FacebookStrategy
    clientID: opts.FACEBOOK_ID
    clientSecret: opts.FACEBOOK_SECRET
    callbackURL: "#{opts.APP_URL}#{opts.facebookCallbackPath}"
    passReqToCallback: true
  , facebookCallback
  passport.use new TwitterStrategy
    consumerKey: opts.TWITTER_KEY
    consumerSecret: opts.TWITTER_SECRET
    callbackURL: "#{opts.APP_URL}#{opts.twitterCallbackPath}"
    passReqToCallback: true
  , twitterCallback

#
# Passport callbacks
#
artsyCallback = (username, password, done) ->
  request.get("#{opts.SECURE_ARTSY_URL}/oauth2/access_token").query(
    client_id: opts.ARTSY_ID
    client_secret: opts.ARTSY_SECRET
    grant_type: 'credentials'
    email: username
    password: password
  ).end accessTokenCallback(done)

facebookCallback = (req, accessToken, refreshToken, profile, done) ->
  if req.user
    request.post("#{opts.SECURE_ARTSY_URL}/api/v1/me/authentications/facebook").query(
      oauth_token: accessToken
      access_token: req.user.get 'accessToken'
    ).end (res) ->
      err = res.body.error or res.body.message + ': Facebook' if res.error
      done err, req.user
  else
    request.get("#{opts.SECURE_ARTSY_URL}/oauth2/access_token").query(
      client_id: opts.ARTSY_ID
      client_secret: opts.ARTSY_SECRET
      grant_type: 'oauth_token'
      oauth_token: accessToken
      oauth_provider: 'facebook'
    ).end accessTokenCallback(done,
      oauth_token: accessToken
      provider: 'facebook'
      name: profile?.displayName
    )

twitterCallback = (req, token, tokenSecret, profile, done) ->
  if req.user
    request.post("#{opts.SECURE_ARTSY_URL}/api/v1/me/authentications/twitter").query(
      oauth_token: token
      oauth_token_secret: tokenSecret
      access_token: req.user.get 'accessToken'
    ).end (res) ->
      err = res.body.error or res.body.message + ': Twitter' if res.error
      done err, req.user
  else
    request.get("#{opts.SECURE_ARTSY_URL}/oauth2/access_token").query(
      client_id: opts.ARTSY_ID
      client_secret: opts.ARTSY_SECRET
      grant_type: 'oauth_token'
      oauth_token: token
      oauth_token_secret: tokenSecret
      oauth_provider: 'twitter'
    ).end accessTokenCallback(done,
      oauth_token: token
      oauth_token_secret: tokenSecret
      provider: 'twitter'
      email: opts.twitterSignupTempEmail(token, tokenSecret, profile)
      name: profile?.displayName
    )

accessTokenCallback = (done, params) ->
  return (e, res) ->

request = require 'superagent'
express = require 'express'
passport = require 'passport'
LocalStrategy = require('passport-local').Strategy
qs = require 'querystring'
crypto = require 'crypto'
