added some stuff like setkey for auth