mocked authenticate