made corrections to edit.ejs and userController.js

This should fix your current issues.