addAuthtoUser function created