Wrap user model logic in anonymous function and remove username
Fix csrf
Add connect-flash
Remove unneeded security functions
Refactor db.js
Add security and flash to app
Only show sign up page if user is not signed in and other fixes