added the app.js check for authentication
Login system working and authentication check. However, flash messages needed
The success messages appear to be showing at least.