Move login to a Service.