When it comes to form-based auth, the codebase has two different but similar mechanisms for redirecting to the login page.
On the one hand we have AuthenticationProcessingFilter, which uses RedirectUtils to redirect to the form following an unsuccessful attempt, and then we have AuthenticationProcessingFilterEntryPoint which has its own code for generating the redirect. They're similar, but do different things. For example, AuthenticationProcessingFilterEntryPoint always adds the context path to the redirect URL, and cannot be configured otherwise. RedirectUtils take account of cases where the context path should not be in the redirect URL.
I suggest that AuthenticationProcessingFilterEntryPoint be refactored to use Redirectutils to generate the URL and initiate the redirect.