Refactor AuthController