Final version of code. Added the POST, PUT and DELETE functions in index.js and the delete function in login.js