update database.yml to postgres
improve authentication.. still needs debugging