errors are now displayed as flash messages