The evolution of the X-ray luminosity functions of unabsorbed and absorbed AGNs out to z ~ 5