void UbuntuOneSettingsPage::LoginClicked() {
  ui_->login_button->setEnabled(false);
  QString username = ui_->username->text();
  QString password = ui_->password->text();

  UbuntuOneAuthenticator* authenticator = new UbuntuOneAuthenticator;
  authenticator->StartAuthorisation(username, password);
  NewClosure(authenticator, SIGNAL(Finished()),
             this, SLOT(Connected(UbuntuOneAuthenticator*)), authenticator);
  NewClosure(authenticator, SIGNAL(Finished()),
             service_, SLOT(AuthenticationFinished(UbuntuOneAuthenticator*)),
             authenticator);
}
void UbuntuOneSettingsPage::LoginClicked() {
  const QString username = ui_->username->text();
  const QString password = ui_->password->text();
  ui_->password->clear();

  UbuntuOneAuthenticator* authenticator = new UbuntuOneAuthenticator;
  authenticator->StartAuthorisation(username, password);
  NewClosure(authenticator, SIGNAL(Finished()), this,
             SLOT(Connected(UbuntuOneAuthenticator*)), authenticator);
  NewClosure(authenticator, SIGNAL(Finished()), service_,
             SLOT(AuthenticationFinished(UbuntuOneAuthenticator*)),
             authenticator);

  ui_->login_state->SetLoggedIn(LoginStateWidget::LoginInProgress);
}