add form validation to /routes/user.js and its templates