Allow LOGIN_REDIRECT_URL_FAILURE to be view name

This tweaks the failure_url handling so that it can be a view name
or a url. Also adds a test for it.

Fixes #123.