Created authentication service class

Refactored the code and extracted INPAuthenticationService class