0.11-stable: Added an optional `referer=` argument to `/login` to specify the URL to redirect to instead of using the `Referer:` HTTP header.
This is the non-controversial part of the patch to solve #5340. The code was mostly copied from th:AccountManagerPlugin, which already implements this functionality.
This also fixes a small typo in `trac/web/href.py`.