Disable login at all
Another way is set the access to false to the login form. Whenever you want to re-enable the login, just comment out the hook. 

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'user_login') {
    $form['#access'] = FALSE;
  }
}