User role specific login link
Which ever role you want to allow to login give the role the permission.

Drupal 6

Please change the permission to an appropriate one. This is just for test purpose.

function modulename_perm() {
  return array('allow modulename login');
}

function modulename_user($op, &amp;$edit, &amp;$account, $category = NULL) {
  if ($op == 'login') {
    if (user_access('allow modulename login') == FALSE) {
      drupal_set_message('Member logins have been temporarily disabled. Please try again later.', 'warning');
      user_logout();
      exit;
    }
  } 
}


DRUPAL 7

function modulename_permission() {
  return array(
    'allow modulename login' =&gt; array(
      'title' =&gt; t('allow modulename login'), 
      'description' =&gt; t('allow modulename login.'),
    ),
  );
}
function modulename_user_login(&amp;$edit, $account) {
 if (user_access('allow modulename login') == FALSE) {
      drupal_set_message('Member logins have been temporarily disabled. Please try again later.', 'warning');
      user_logout();
      exit;
 }
}