Moved login to modules