added justin's authentication code