player spawn/despawn code for login/logout