command :login do |c|
  c.syntax = 'distribution login'
  c.summary = 'Save account credentials for specific service'
  c.description = ''

  c.action do |args, options|
    say_warning "You are already authenticated" if Security::InternetPassword.find(:server => service.host)

    user = ask "Username:"
    pass = password "Password:"

    Security::InternetPassword.add(service.host, user, pass)

    say_ok "Account credentials saved"
  end
end