Spring Security: Custom Pre-Authentication Flow