redoing auth and restructing a bit