Fix an error that occurs when trying to edit User profile

This pull request includes a fix to the bug where editing User profile gives an error.  This is due to 'user_id' stored in local storage is not being retrieved properly.  Also, refactored userController.editUser method to ensure that we update a user record and sends back a response correctly.

cc: @jjmerino, @kmeurer, @jamesongamble, @suprbh