Login controller functions are moved to services