Made some general changes and got authentication working again