reworked auth