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

        return callback null, session  if session?

        clientId = createId()

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

          console.error err  if err?


  safeGuestSessionName = (username)->

    if username is "guestuser"
      console.log "FIXME @gokmen --- denying to create session for guestuser"
      username = JUser.createGuestUsername()
      console.log "FIXME @gokmen --- overwritten with #{username}."

    return username


  @createSession = (callback) ->

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