Good tutorial, alternatively you could use AGameMode::PreLogin and AGameMode::Login as the options are passed to these functions as well, although I think that you can’t kick a player inside there as it is too early in the login process, at least in PreLogin. Still you could set the error message to disallow a login there.
Anyway, is there a specific reason why you copied the whole code over instead of just calling Super::InitNewPlayer? At least that would remove the need for all those extra includes.