moving login to connector class