                 else
                     logFound()
             else
-                console.log("create")
                 db_create()
 
     db_create = ->
-        console.log("create")
         compound.logger.write "Database #{db.name} on" +
                 " #{db.connection.host}:#{db.connection.port} doesn't exist."
         db.create (err) ->

    # Add admin to couchDB 
    # Result : Unauthorized applications cannot create a database
    addCouchdbAdmin = (callback) ->
        logCouchdb = initLogCouchdb()
        couchClient.put "_config/admins/#{logCouchdb[0]}", "#{logCouchdb[1]}",
                (err, res, body) =>
            couchClient.setBasicAuth(logCouchdb[0],logCouchdb[1])
            couchClient.get 'cozy/_security', (err, res, body) =>
                callback err, body

    # Add admin to cozy database
    # Result : Unauthorized applications cannot read on cozy
    addCozyAdmin = (callback) ->
        logCouchdb = initLogCouchdb()
        data =
            "admins":
                "names":[logCouchdb[0]]
                "roles":[]
            "readers":
                "names":[logCouchdb[0]]
                "roles":[]
        couchClient.setBasicAuth(logCouchdb[0],logCouchdb[1])
        couchClient.put 'cozy/_security', data, (err, res, body)->
            callback err



    ### Helpers ###

    initLoginCouch = ->
        data = fs.readFileSync '/etc/cozy/couchdb.login'
        lines = S(data.toString('utf8')).lines()
        return lines
