Added authorization to the app, created the flash messages