Added player spawn logic in the connection module.