The WHMCS AUTH module offers login integration between WHMCS and Drupal. Alters the Drupal login process to authenticate WHMCS users using external API and provides a login block to include in your WHMCS theme. (loginbox.php)
After login if the user hasn't login before it will create a new Drupal user, with "WHMCS user" role assigned, plus an extra WHMCS userid field