Dedicated server async authentication on PreLogin/Login

Thanks, I can do the spectate mode with the spectator flags in C++ but how to swap from spectator to actual player? And is there a function to kick player?