broke out Request authentication function