Update AuthController.js

if errors occur not working properly. this is the fix