working on new auth layer (almost complete)