fixed bug with resetting headers when re authenticated