Password-protected page redirecting to frontpage when I enter the password

Turns out it was a problem with my browser blocking HTTP referrers.

Disabling referrer blocking or switching to another browser solves the issue.

(related Trac ticket)