Use django messaging and session to show error messages.

This patch does away with ugly hacks with URLs to the
home page to show error messages. Rather, it uses django's
builtin messaging framework and session variables to do this.