    # File lib/metacat.rb, line 82
      def initialize(path_to_metacat, options = {}, &block)
        @uri = URI.parse(path_to_metacat)
        @cookie = false
        if options.has_key?('username') && options.has_key?('password')
          login(options['username'], options['password'])
        end
        if block_given?
          yield self
          logout if @logged_in
        end
      end