fix issue with uploads failing when logged in