         return callback null, session  if session?
 
         clientId = createId()
-
-        session = new JSession { clientId, username }
+        username = safeGuestSessionName username
+        session  = new JSession { clientId, username }
         session.save (err)->
           return callback err  if err?
           callback null, session

          console.error err  if err?


  @createSession =(callback) ->

    JUser = require './user'
    clientId = createId()

      if err then @emit 'error', err
      else
        {nickname: username} = account.profile
        username = safeGuestSessionName username
        session  = new JSession { clientId, username }
        session.save (err)->
          if err
            callback err
