I don't want to be rude, but did you tried to do what sofar explained ?
You have your own car mod working with entities, so at least you already have an example of code that attach the player to an entity.
I did not tried by myself, but from sofar comment, I just had a look in the
minetest api, searched for "connect" and "spawn" and found two functions: minetest.register_on_joinplayer and minetest.register_on_respawnplayer.
So, you just have to use those two functions to register callbacks that will attache your player to an entity, just like it's done when a player use the "use" button to get into your car mod.
Maybe you already tried and got some errors, then ignore the above comment and let us know what the problem is.