Refactor service base and login service