title: TypeError: Cannot read property 'length' of undefined nodejs
body: <p>Everything runs properly from nodemon until I go to the browser to register and got the error message "TypeError: Cannot read property 'length' of undefined"
  When I decided to comment the if("req.body.password.length > 4) the registration didn't work complaining password didn't match. 
  Please help am very new to Node</p>
  
  <p><a href="https://gist.github.com/dngoyb/de020c2686a1104af748593d37e0e082" rel="nofollow noreferrer">https://gist.github.com/dngoyb/de020c2686a1104af748593d37e0e082</a></p>
  
  <p>this is the full error</p>
  
  <pre><code>TypeError: Cannot read property 'length' of undefined
      at router.post (/home/zidiou/Documents/Vidjot/Vidjot/routes/users.js:26:28)
      at Layer.handle [as handle_request] (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/layer.js:95:5)
      at next (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/route.js:137:13)
      at Route.dispatch (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/route.js:112:3)
      at Layer.handle [as handle_request] (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/layer.js:95:5)
      at /home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:281:22
      at Function.process_params (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:335:12)
      at next (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:275:10)
      at Function.handle (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:174:3)
      at router (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:47:12)
      at Layer.handle [as handle_request] (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:317:13)
      at /home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:335:12)
      at next (/home/zidiou/Documents/Vidjot/Vidjot/node_modules/express/lib/router/index.js:275:10)
      at /home/zidiou/Documents/Vidjot/Vidjot/app.js:59:4
  </code></pre>