Persist a post login redirect through login failiure

This is done by populating the hidden 'next' field with its own value on post if there is not a next url parameter. Closes #141