refactors auth controller into services