Consolidate auth functions