def connect!
      @connection = HTTParty.post(File.join(url, "rest/user/login"), body: credentials_hash )
      @cookies['Cookie'] = @connection.headers['set-cookie']
      @connection.code
    end
def connect!
      @connection = HTTParty.post(File.join(url, "rest/user/login"), body: credentials_hash )
      @cookies['Cookie'] = @connection.headers['set-cookie']
      @connection.code
    end
Makes a login call and sets the Cookie headers

 Returns the status code of the connection call