All auth code written out, awaits testing.