added set token cookie for re authentication
fixed bug with resetting headers when re authenticated