Fix login, add base service, model and controller. Some more changes.