 
     if not user
       return resp.send 500, error: "No users with the specified shortName"
+
     user.getSubscriptionAdminURL (err, recurlyAdminUrl) ->
       if err?
         return resp.send 404, error: err.error


        tool.save (err) ->
          console.warn err if err?
          Tool.findOneById tool._id, (err, tool) ->
            if err?
              console.warn err

getEffectiveUser = (user, callback) ->
  # Find all users with user.shortName in their canBeReally list
  User.findCanBeReally user.shortName, (err, canBeReally) ->
    if err?
      return callback err, null
    if user.defaultContext in _.pluck(canBeReally, 'shortName')
      # User has a defaultContext, and it is one of the contexts they can switch to.
      effectiveUser = _.findWhere canBeReally, shortName: user.defaultContext
    else
      effectiveUser = user
    return callback null, effectiveUser

# Verify callback for LocalStrategy
verify = (username, password, callback) ->
