implement auth and saving