Convert Spring Security configuration from XML configuration to Java configuration.
   BUG: Language cannot be changed before be logged in.
Upgraded to the latest dependency versions.
Tests fail due to the new Spring Security CSRF token initialization.
Resolved BUG: Language cannot be changed before be logged in.