Putted the Login Logic into service