fixed receive pack bug and add basic authentication