start of user auth functionality