sends error message to user instead of redirecting to a blank page. closes #11