creating and testing class for authentication