This patch makes sure that all the variables and attributes that the
login page templates use are always defined, to avoid annoying lookup
errors in the logs.
There is still an error about request.COOKIES.logout_reason because
I'm not entirely sure how to best handle that one.
Change-Id: I692ea70bc09b819b39587f5bd6cb4e729731754f