Add auth service. Fix code style and tests.
Add auth service implementation and some tests