Added user auth from scratch and appropriate tests