Configuring Spring Security to load users from the database and assign default authorities based on their roles.