complete auth from scratch