    # File lib/fog/cloudstack/compute.rb, line 154
            def login(username,password,domain)
              response = issue_request({
                'response' => 'json',
                'command'  => 'login',
                'username' => username,
                'password' => Digest::MD5.hexdigest(password),
                'domain'   => domain
              })

              # Parse response cookies to retrive JSESSIONID token
              cookies   = CGI::Cookie.parse(response.headers['Set-Cookie'])
              sessionid = cookies['JSESSIONID'].first

              # Decode the login response
              response   = Fog::JSON.decode(response.body)

              user = response['loginresponse']
              user.merge!('sessionid' => sessionid)

              @cloudstack_session_id  = user['sessionid']
              @cloudstack_session_key = user['sessionkey']

              user
            end