credential insert procedure on server.js