finished todo in login.js, also updated the index.js file