refactord auth.spec.js