Move Authentication database routines into own module
Cleanup tests