fixing error with authetication