put all of the old authentication code back so that it can be reused