moved login to a service