def login
    connect! unless connected?    
    json = <<-EOF
      {
        "user_auth": {
          "user_name": "#{@user}",
           "password": "#{OpenSSL::Digest::MD5.new(@pass)}",
            "version": 2
        },
        "application": "sugarcrm_rubygem"
      }
    EOF
    json.gsub!(/^\s{6}/,'')
    response = send!(:login, json)
  end
def login
    connect! unless connected?    
    json = <<-EOF
      {
        "user_auth": {
          "user_name": "#{@user}",
           "password": "#{OpenSSL::Digest::MD5.new(@pass)}",
            "version": 2
        },
        "application": "sugarcrm_rubygem"
      }
    EOF
    json.gsub!(/^\s{6}/,'')
    response = send!(:login, json)
  end
Logs the user into the Sugar application.