Implementation of the reworked auth component from mschaerer