Partial fix for Authenticating on access denied page redirects to a wrong url #31