ADded auth and lookup function.