                   callback null, guest
                   visitor.emit ['change','logout'], guest
         else callback new KodingError 'Could not restore your session!'
-  
+
   @verifyEnrollmentEligibility = ({email, inviteCode}, callback)->
     JRegistrationPreferences.one {}, (err, prefs)->
       if err

          status: $in : ['active','sent']
        }, (err, invite)->
          # callback null, yes, invite
          if err or !invite? 
            callback new KodingError 'Invalid invitation ID!'
          else 
            callback null, yes, invite
      else
        callback new KodingError 'Invitation code is required!'
  
  @verifyKodingenPassword = ({username, password, kodingenUser}, callback)->
    if kodingenUser isnt 'on'
      callback null

      emailConfirmation :
        targetType      : JEmailConfirmation
        as              : 'confirmation'

  sessions  = {}
  users     = {}
  guests    = {}
