       delete client.connection.delegate
       delete client.sessionToken
 
-    console.log "JUser.logout JSession#remove", {sessionToken}
+    # if sessionToken doesnt exist, safe to return
+    return callback null unless sessionToken
+
     JSession.remove { clientId: sessionToken }, callback
 
   @verifyEnrollmentEligibility = ({email, inviteCode}, callback)->

            globalFlags           : ['deleted']
            onlineStatus          : 'offline'
          }
          delegate.update $set: accountValues, (err)=>
            return callback err  if err?
            JName.release confirmUsername, (err)=>
              return callback err  if err?
              JAccount.emit "UsernameChanged", {
                oldUsername    : confirmUsername
                isRegistration : false
                username
              }
              ((require 'koding-counter') {
                db          : JAccount.getClient()
                counterName : "koding~#{confirmUsername}~"
                offset      : 0
              }).reinitialize ->
              user.unlinkOAuths =>
                Payment = require "../payment"
                Payment.deleteAccount client, (err)=>
                  @logout client, callback

  @isRegistrationEnabled = (callback)->


  users     = {}
  guests    = {}

  @unregister = secure (client, toBeDeletedUsername, callback) ->
    {delegate} = client.connection

    # deleter should be registered one
    if delegate.type is 'unregistered'
      return callback createKodingError "You are not registered!"

    # only owner and the dummy admins can delete a user
    unless toBeDeletedUsername is delegate.profile.nickname or
           delegate.can 'administer accounts'
      return callback createKodingError "You must confirm this action!"

    @createGuestUsername (err, username) =>
      return callback err  if err?
      email = "#{username}@koding.com"
      @one { username: toBeDeletedUsername }, (err, user) =>
        return callback err  if err?
        return callback createKodingError "User not found #{toBeDeletedUsername}"  unless user

        userValues = {
          username
