 
 withConvertedUser = (opts, callback) ->
 
-  [opts, callback]          = [callback, opts]  unless callback
-  { context, userFormData } = opts  if opts
+  [opts, callback] = [callback, opts]  unless callback
+  opts ?= {}
+  { context, userFormData } = opts
 
   context      ?= { group : 'koding' }
   userFormData ?= generateDummyUserFormData()

  expect
  KONFIG
  ObjectId
  fetchGroup
  expectRelation
  withDummyClient
  withCreatedUser

      client.sessionToken         = newToken
      client.connection.delegate  = account

      fetchOrCreateGroup client, opts, (group) ->
        if opts?.userFormData?
        then callback { client, user, account, group, sessionToken : newToken }
        else callback { client, user, account, group, sessionToken : newToken, userFormData }
