consolidated authentication services into auth.js