Broken Authentication (Again)

Trying to make a function for authenticating to any URL... It's a bit
broken still...