user auth and errors functional